Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | revert some ttk::treeview changes mainly regarding focus ring |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a738493ec144903d17cacb321843a11b |
User & Date: | chw 2024-08-21 08:44:45.264 |
2024-08-21
| ||
10:11 | add libxft upstream changes check-in: e8d2ce7c0b user: chw tags: trunk | |
08:44 | revert some ttk::treeview changes mainly regarding focus ring check-in: a738493ec1 user: chw tags: trunk | |
07:16 | add tklib upstream changes check-in: b42e04a870 user: chw tags: trunk | |
Changes to jni/sdl2tk/generic/ttk/ttkClassicTheme.c.
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP)))) TTK_LAYOUT("Horizontal.TScale", TTK_GROUP("Horizontal.Scale.highlight", TTK_FILL_BOTH, TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT)))) /* put highlight border around treeview */ TTK_LAYOUT("Treeview", TTK_GROUP("Treeview.highlight", TTK_FILL_BOTH, TTK_GROUP("Treeview.field", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Treeview.padding", TTK_FILL_BOTH, TTK_NODE("Treeview.treearea", TTK_FILL_BOTH))))) TTK_END_LAYOUT_TABLE /*------------------------------------------------------------------------ * TtkClassicTheme_Init -- * Install classic theme. */ | > > > > > > > | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP)))) TTK_LAYOUT("Horizontal.TScale", TTK_GROUP("Horizontal.Scale.highlight", TTK_FILL_BOTH, TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT)))) #ifdef CLASSIC_TREEVIEW_WITH_HIGHLIGHT /* put highlight border around treeview */ TTK_LAYOUT("Treeview", TTK_GROUP("Treeview.highlight", TTK_FILL_BOTH, TTK_GROUP("Treeview.field", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Treeview.padding", TTK_FILL_BOTH, TTK_NODE("Treeview.treearea", TTK_FILL_BOTH))))) #else TTK_LAYOUT("Treeview", TTK_GROUP("Treeview.field", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Treeview.padding", TTK_FILL_BOTH, TTK_NODE("Treeview.treearea", TTK_FILL_BOTH)))) #endif TTK_END_LAYOUT_TABLE /*------------------------------------------------------------------------ * TtkClassicTheme_Init -- * Install classic theme. */ |
Changes to jni/sdl2tk/generic/ttk/ttkTreeview.c.
1628 1629 1630 1631 1632 1633 1634 | * Computes headingArea and treeArea. * Computes subtree height. * Invokes scroll callbacks. */ static void TreeviewDoLayout(void *clientData) { Treeview *tv = (Treeview *) clientData; | | > > > > > > > > > > | | 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | * Computes headingArea and treeArea. * Computes subtree height. * Invokes scroll callbacks. */ static void TreeviewDoLayout(void *clientData) { Treeview *tv = (Treeview *) clientData; int totalRows, visibleRows; Ttk_PlaceLayout(tv->core.layout,tv->core.state,Ttk_WinBox(tv->core.tkwin)); tv->tree.treeArea = Ttk_ClientRegion(tv->core.layout, "treearea"); ResizeColumns(tv, tv->tree.treeArea.width); TtkScrolled(tv->tree.xscrollHandle, tv->tree.xscroll.first, tv->tree.xscroll.first + tv->tree.treeArea.width, TreeWidth(tv)); if (tv->tree.showFlags & SHOW_HEADINGS) { tv->tree.headingArea = Ttk_PackBox( &tv->tree.treeArea, 1, tv->tree.headingHeight, TTK_SIDE_TOP); } else { tv->tree.headingArea = Ttk_MakeBox(0,0,0,0); } tv->tree.root->state |= TTK_STATE_OPEN; totalRows = CountRows(tv->tree.root) - 1; visibleRows = tv->tree.treeArea.height / tv->tree.rowHeight; if (tv->tree.treeArea.height % tv->tree.rowHeight) { /* When the treeview height doesn't correspond to an exact number * of rows, the visible row count must be incremented to draw a * partial row at the bottom. The total row count must also be * incremented to be able to scroll all the way to the bottom. */ visibleRows++; totalRows++; } TtkScrolled(tv->tree.yscrollHandle, tv->tree.yscroll.first, tv->tree.yscroll.first + visibleRows, totalRows); } /* + TreeviewSize -- * SizeProc() widget hook. Size is determined by * -height option and column widths. */ static int TreeviewSize(void *clientData, int *widthPtr, int *heightPtr) |
1744 1745 1746 1747 1748 1749 1750 | Tcl_Obj **values = 0; int i; if (!item->valuesObj) { return; } | < < < < < | 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 | Tcl_Obj **values = 0; int i; if (!item->valuesObj) { return; } Tcl_ListObjGetElements(NULL, item->valuesObj, &nValues, &values); for (i = 0; i < tv->tree.nColumns; ++i) { tv->tree.columns[i].data = (i < nValues) ? values[i] : 0; } for (i = 1; i < tv->tree.nDisplayColumns; ++i) { TreeColumn *column = tv->tree.displayColumns[i]; |
1779 1780 1781 1782 1783 1784 1785 | { Ttk_State state = ItemState(tv, item); DisplayItem displayItem; int rowHeight = tv->tree.rowHeight; int x = tv->tree.treeArea.x - tv->tree.xscroll.first; int y = tv->tree.treeArea.y + rowHeight * (row - tv->tree.yscroll.first); | < < < < < < < < < < < < | | 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 | { Ttk_State state = ItemState(tv, item); DisplayItem displayItem; int rowHeight = tv->tree.rowHeight; int x = tv->tree.treeArea.x - tv->tree.xscroll.first; int y = tv->tree.treeArea.y + rowHeight * (row - tv->tree.yscroll.first); if (row % 2) state |= TTK_STATE_ALTERNATE; PrepareItem(tv, item, &displayItem); /* Draw row background: */ { Ttk_Box rowBox = Ttk_MakeBox(x, y, TreeWidth(tv), rowHeight); DisplayLayout(tv->tree.rowLayout, &displayItem, state, rowBox, d); } /* Draw tree label: */ if (tv->tree.showFlags & SHOW_TREE) { int indent = depth * tv->tree.indent; |
Changes to jni/sdl2tk/library/ttk/altTheme.tcl.
90 91 92 93 94 95 96 | ttk::style map TNotebook.Tab \ -background [list selected $colors(-frame)] \ -expand [list selected {2 2 1 0}] \ # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background $colors(-window) \ | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ttk::style map TNotebook.Tab \ -background [list selected $colors(-frame)] \ -expand [list selected {2 2 1 0}] \ # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background $colors(-window) \ -focuswidth 0 ttk::style map Treeview \ -background [list disabled $colors(-frame)\ selected $colors(-selectbg)] \ -foreground [list disabled $colors(-disabledfg) \ selected $colors(-selectfg)] ttk::style configure TScale \ |
Changes to jni/sdl2tk/library/ttk/clamTheme.tcl.
121 122 123 124 125 126 127 | -padding [list selected {6 4 6 2}] \ -background [list selected $colors(-frame) {} $colors(-darker)] \ -lightcolor [list selected $colors(-lighter) {} $colors(-dark)] # Treeview: ttk::style configure Heading \ -font TkHeadingFont -relief raised -padding {3} | | > | < | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | -padding [list selected {6 4 6 2}] \ -background [list selected $colors(-frame) {} $colors(-darker)] \ -lightcolor [list selected $colors(-lighter) {} $colors(-dark)] # Treeview: ttk::style configure Heading \ -font TkHeadingFont -relief raised -padding {3} ttk::style configure Treeview -background $colors(-window) \ -focuswidth 0 ttk::style map Treeview \ -background [list disabled $colors(-frame)\ selected $colors(-selectbg)] \ -foreground [list disabled $colors(-disabledfg) \ selected $colors(-selectfg)] ttk::style configure TLabelframe \ -labeloutside true -labelmargins {0 0 0 4} \ -borderwidth 2 -relief raised ttk::style configure TProgressbar -background $colors(-frame) |
Changes to jni/sdl2tk/library/ttk/classicTheme.tcl.
97 98 99 100 101 102 103 | -padding {3m 1m} \ -background $colors(-troughbg) \ -focussolid 1 ttk::style map TNotebook.Tab -background [list selected $colors(-frame)] # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised | | > | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | -padding {3m 1m} \ -background $colors(-troughbg) \ -focussolid 1 ttk::style map TNotebook.Tab -background [list selected $colors(-frame)] # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background $colors(-window) \ -focuswidth 0 ttk::style map Treeview \ -background [list disabled $colors(-frame)\ selected $colors(-selectbg)] \ -foreground [list disabled $colors(-disabledfg) \ selected $colors(-selectfg)] # |
Changes to jni/sdl2tk/library/ttk/defaults.tcl.
244 245 246 247 248 249 250 | # Treeview. # ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview \ -background $colors(-window) \ -fieldbackground $colors(-window) \ -foreground $colors(-text) \ | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | # Treeview. # ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview \ -background $colors(-window) \ -fieldbackground $colors(-window) \ -foreground $colors(-text) \ -focuswidth 0 ttk::style configure Treeview.Separator \ -background $colors(-alternate) ttk::style map Treeview \ -background [list disabled $colors(-frame)\ selected $colors(-selectbg)] \ -foreground [list disabled $colors(-disabledfg) \ selected $colors(-selectfg)] |
Changes to jni/sdl2tk/library/ttk/droidTheme.tcl.
295 296 297 298 299 300 301 | [list $I(spinup-n) disabled $I(spinup-d) pressed $I(spinup-p)] ttk::style element create Spinbox.downarrow image \ [list $I(spindown-n) disabled $I(spindown-d) pressed $I(spindown-p)] ttk::style element create Spinbox.padding image $I(spinbut-n) \ -border {0 3} # Treeview (since 8.6b1 or 8.5.9) | | > | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | [list $I(spinup-n) disabled $I(spinup-d) pressed $I(spinup-p)] ttk::style element create Spinbox.downarrow image \ [list $I(spindown-n) disabled $I(spindown-d) pressed $I(spindown-p)] ttk::style element create Spinbox.padding image $I(spinbut-n) \ -border {0 3} # Treeview (since 8.6b1 or 8.5.9) ttk::style configure Treeview -background $colors(-window) \ -focuswidth 0 # -rowheight [font metrics TkDefaultFont -linespace] ttk::style map Treeview \ -background [list selected $colors(-selectbg)] \ -foreground [list selected $colors(-selectfg)] # Treeview (older version) ttk::style configure Row -background $colors(-window) |