Skip to content

Commit

Permalink
Made the ttk::treeview cell padding scaling-aware.
Browse files Browse the repository at this point in the history
  • Loading branch information
csaba committed Aug 20, 2024
2 parents 45d98f6 + add9fb5 commit ecb22e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generic/ttk/ttkTreeview.c
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,8 @@ static void DrawCells(
Ttk_Layout layout = tv->tree.cellLayout;
Ttk_Style style = Ttk_LayoutStyle(tv->core.layout);
Ttk_State state = ItemState(tv, item);
Ttk_Padding cellPadding = {4, 0, 4, 0};
int horizPad = round(4 * TkScalingLevel(tv->core.tkwin));
Ttk_Padding cellPadding = {horizPad, 0, horizPad, 0};
DisplayItem displayItemLocal;
DisplayItem displayItemCell, displayItemCellSel;
int rowHeight = tv->tree.rowHeight * item->height;
Expand Down

0 comments on commit ecb22e5

Please sign in to comment.