Skip to content

Commit

Permalink
Traktor: Pixel aligned folding arrows in GridView and TreeView.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Apr 29, 2024
1 parent c885091 commit 36c0b7d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 63 deletions.
12 changes: 1 addition & 11 deletions code/Ui/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void Panel::eventPaint(PaintEvent* event)
const Rect rcInner = Widget::getInnerRect();
const StyleSheet* ss = getStyleSheet();

canvas.setBackground(ss->getColor(this, isEnable(true) ? L"background-color" : L"background-color-disabled"));
canvas.fillRect(rcInner);

const bool focus = containFocus();
Expand All @@ -90,17 +91,6 @@ void Panel::eventPaint(PaintEvent* event)
AnCenter
);

const Point pntBorder[5] =
{
Point(rcInner.left, rcInner.top),
Point(rcInner.right - 1, rcInner.top),
Point(rcInner.right - 1, rcInner.bottom - 1),
Point(rcInner.left, rcInner.bottom - 1),
Point(rcInner.left, rcInner.top)
};
canvas.setForeground(Color4ub(128, 128, 128));
canvas.drawLines(pntBorder, 5);

event->consume();
}

Expand Down
40 changes: 14 additions & 26 deletions resources/runtime/themes/Dark/New/UI/GridView.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 14 additions & 26 deletions resources/runtime/themes/Dark/New/UI/TreeView.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 36c0b7d

Please sign in to comment.