diff options
-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; |