summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-14 17:24:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-14 17:24:10 +0100
commit135755ed9e64d4208ef5b578c9b43ad23bb4ed66 (patch)
tree3a35d971418927ba816aaa943584bd4d32eefebf /vcl/unx
parentf6a04cb509a2c12932c6be789fdc0cdb9d447aad (diff)
gtk3: shiny native focus rectangles for checkboxes
Change-Id: I4b70878700851cc13a20321a11703c93e3f8ed49
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index d05f86b27db0..9db5f72b9014 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -895,7 +895,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
GTK_STATE_FLAG_NORMAL));
context = mpCheckButtonStyle;
styleClass = GTK_STYLE_CLASS_CHECK;
- renderType = RENDER_CHECK;
+ renderType = nPart == PART_FOCUS ? RENDER_FOCUS : RENDER_CHECK;
break;
case CTRL_RADIOBUTTON:
flags = (GtkStateFlags)(flags |
@@ -1037,14 +1037,17 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break;
case RENDER_FOCUS:
{
- GtkBorder border;
+ if (nType != CTRL_CHECKBOX)
+ {
+ GtkBorder border;
- gtk_style_context_get_border(context, flags, &border);
+ gtk_style_context_get_border(context, flags, &border);
- nX += border.left;
- nY += border.top;
- nWidth -= border.left + border.right;
- nHeight -= border.top + border.bottom;
+ nX += border.left;
+ nY += border.top;
+ nWidth -= border.left + border.right;
+ nHeight -= border.top + border.bottom;
+ }
gtk_render_focus(context, cr, nX, nY, nWidth, nHeight);