Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMartin committed Feb 12, 2024
1 parent 94ee054 commit 9000cd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BMPEditor/CMakeLists.txt.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 12.0.2, 2024-02-12T01:12:26. -->
<!-- Written by QtCreator 12.0.2, 2024-02-12T09:42:06. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
4 changes: 3 additions & 1 deletion BMPEditor/Editor/imagehistogramwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ void ImageHistogramWidget::paintEvent(QPaintEvent *event) {

QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.setPen(Qt::NoPen);
painter.setBrush(QColor(52, 52, 56));
painter.drawRect(0, 0, this->width(), this->height());

// vykresli histogram RGB
float barWidth = (float)width() / histogramRed.size();
Expand All @@ -31,7 +34,6 @@ void ImageHistogramWidget::paintEvent(QPaintEvent *event) {
float x;
float height;

painter.setPen(Qt::NoPen);
painter.setBrush(Qt::red);
for (size_t i = 0; i < histogramRed.size(); ++i) {
x = (float)i * barWidth;
Expand Down

0 comments on commit 9000cd0

Please sign in to comment.