summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkElements.c
diff options
context:
space:
mode:
authorcsaba <csaba>2023-10-06 17:03:54 (GMT)
committercsaba <csaba>2023-10-06 17:03:54 (GMT)
commitdc3a071d220482ed8cccb89da7870de15a527d88 (patch)
tree26de8c003766c5230e65fe57f2718a736b3c7cf9 /generic/ttk/ttkElements.c
parent4b1316fef5c8a0b9ddee3ae103fb9bf70d7de3a0 (diff)
downloadtk-dc3a071d220482ed8cccb89da7870de15a527d88.zip
tk-dc3a071d220482ed8cccb89da7870de15a527d88.tar.gz
tk-dc3a071d220482ed8cccb89da7870de15a527d88.tar.bz2
Visual improvements regarding the focus ring around the ttk::combobox and ttk::spinbox widgets of the themes "alt" and "clam".
Diffstat (limited to 'generic/ttk/ttkElements.c')
-rw-r--r--generic/ttk/ttkElements.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 0cb34a4..bbe5a95 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -247,6 +247,9 @@ static void FieldElementDraw(
int y1 = b.y, y2 = b.y + b.height - 1;
int w = WIN32_XDRAWLINE_HACK;
+ /*
+ * Draw the outer rounded rectangle
+ */
XDrawLine(disp, d, focusGC, x1+1, y1, x2-1+w, y1); /* N */
XDrawLine(disp, d, focusGC, x1+1, y2, x2-1+w, y2); /* S */
XDrawLine(disp, d, focusGC, x1, y1+1, x1, y2-1+w); /* W */
@@ -255,6 +258,10 @@ static void FieldElementDraw(
b.x += 1; b.y += 1; b.width -= 2; b.height -= 2;
}
+ /*
+ * If focusWidth > 1 then draw the inner rectangle,
+ * else the only one replacing the (outer) border
+ */
XDrawRectangle(disp, d, focusGC, b.x, b.y, b.width-1, b.height-1);
GC bgGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);