summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx')
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx49
1 files changed, 14 insertions, 35 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 17929b296581..e7e194e50a62 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -22,7 +22,6 @@
#include <vcl/decoview.hxx>
#include <vcl/settings.hxx>
#include <unx/fontmanager.hxx>
-#include <headless/CustomWidgetDraw.hxx>
#include "cairo_gtk3_cairo.hxx"
#include <boost/optional.hpp>
@@ -2261,21 +2260,17 @@ namespace
}
}
+void GtkSalGraphics::handleDamage(const tools::Rectangle& rDamagedRegion)
+{
+ assert(m_pWidgetDraw);
+ assert(!rDamagedRegion.IsEmpty());
+ mpFrame->damaged(rDamagedRegion.Left(), rDamagedRegion.Top(), rDamagedRegion.GetWidth(), rDamagedRegion.GetHeight());
+}
+
bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& rValue,
- const OUString& aCaptions)
+ const OUString&)
{
- if (m_pWidgetDraw)
- {
- bool bReturn = SvpSalGraphics::drawNativeControl(nType, nPart, rControlRegion,
- nState, rValue, aCaptions);
-
- if (bReturn && !rControlRegion.IsEmpty())
- mpFrame->damaged(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
-
- return bReturn;
- }
-
RenderType renderType = nPart == ControlPart::Focus ? RenderType::Focus : RenderType::BackgroundAndFrame;
GtkStyleContext *context = nullptr;
const gchar *styleClass = nullptr;
@@ -2688,17 +2683,10 @@ static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle,
return aEditRect;
}
-bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState eState,
- const ImplControlValue& rValue, const OUString& aCaption,
+bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState,
+ const ImplControlValue& rValue, const OUString&,
tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion )
{
- if (hasWidgetDraw())
- {
- return m_pWidgetDraw->getNativeControlRegion(nType, nPart, rControlRegion,
- eState, rValue, aCaption,
- rNativeBoundingRegion, rNativeContentRegion);
- }
-
/* TODO: all this functions needs improvements */
tools::Rectangle aEditRect = rControlRegion;
gint indicator_size, indicator_spacing, point;
@@ -2946,14 +2934,8 @@ vcl::Font pango_to_vcl(const PangoFontDescription* font, const css::lang::Locale
return aFont;
}
-void GtkSalGraphics::updateSettings(AllSettings& rSettings)
+bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
{
- if (m_pWidgetDraw)
- {
- m_pWidgetDraw->updateSettings(rSettings);
- return;
- }
-
GtkStyleContext* pStyle = gtk_widget_get_style_context( mpWindow );
StyleContextSave aContextState;
aContextState.save(pStyle);
@@ -3294,15 +3276,12 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings)
fprintf( stderr, "Theme name is \"%s\"\n", pThemeName );
g_free(pThemeName);
#endif
+
+ return true;
}
-bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+bool GtkSalGraphics::isNativeControlSupported( ControlType nType, ControlPart nPart )
{
- if (m_pWidgetDraw)
- {
- return m_pWidgetDraw->isNativeControlSupported(nType, nPart);
- }
-
switch(nType)
{
case ControlType::Pushbutton: