diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-07-04 10:22:23 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-07-09 15:33:17 +0200 |
commit | b7ae14ba2f90507cab1925cd3c63dfe996cf76c7 (patch) | |
tree | 77109f08932ed29f0a754db5fff16c122b329320 /vcl | |
parent | 338c5387b57a0ae1eafd36bc89d449201bf1e9b8 (diff) |
Try to move adjusting focus rect down to gtk3 code
as it makes the focus rect look oddly shifted for kde5 widgets
Change-Id: Ia42ccf30207a8c804d23ba45870d839f94c3f858
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 8 |
2 files changed, 7 insertions, 13 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 6facf9159838..50b62c50b020 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2918,12 +2918,6 @@ void RadioButton::ShowFocus(const tools::Rectangle& rRect) aInRect.SetLeft( rRect.Left() ); // exclude the radio element itself from the focusrect - //to-do, figure out a better solution here - aInRect.AdjustLeft( -2 ); - aInRect.AdjustRight(2 ); - aInRect.AdjustTop( -2 ); - aInRect.AdjustBottom(2 ); - DrawNativeControl(ControlType::Radiobutton, ControlPart::Focus, aInRect, ControlState::FOCUSED, aControlValue, OUString()); } @@ -3743,12 +3737,6 @@ void CheckBox::ShowFocus(const tools::Rectangle& rRect) aInRect.SetLeft( rRect.Left() ); // exclude the checkbox itself from the focusrect - //to-do, figure out a better solution here - aInRect.AdjustLeft( -2 ); - aInRect.AdjustRight(2 ); - aInRect.AdjustTop( -2 ); - aInRect.AdjustBottom(2 ); - DrawNativeControl(ControlType::Checkbox, ControlPart::Focus, aInRect, ControlState::FOCUSED, aControlValue, OUString()); } diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 9ed8d7c96dc3..180a050ebc59 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2499,7 +2499,13 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co break; case RenderType::Focus: { - if (nType != ControlType::Checkbox) + if (nType == ControlType::Checkbox || + nType == ControlType::Radiobutton) + { + nX -= 2; nY -=2; + nHeight += 4; nWidth += 4; + } + else { GtkBorder border; |