From 212ccd9439be9110c99a8f01c0bd3105d65d7751 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 23 Mar 2001 23:02:45 +0000 Subject: Hack around scroll bar size problem on GTK+ 1.2.9 / Gnome 1.4 by hardcoding width to 16 if width is 0. --- gtk/ScintillaGTK.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 75c19d733..f4602a5b7 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -893,7 +893,15 @@ void ScintillaGTK::Resize(int width, int height) { // Not always needed, but some themes can have different sizes of scrollbars scrollBarWidth = GTK_WIDGET(scrollbarv.GetID())->requisition.width; + if ((scrollBarWidth == 0)) { + scrollBarWidth = 16; + GTK_WIDGET(scrollbarv.GetID())->requisition.width = scrollBarWidth; + } scrollBarHeight = GTK_WIDGET(scrollbarh.GetID())->requisition.height; + if (horizontalScrollBarVisible && (scrollBarHeight == 0)) { + scrollBarHeight = 16; + GTK_WIDGET(scrollbarh.GetID())->requisition.height = scrollBarHeight; + } // These allocations should never produce negative sizes as they would wrap around to huge // unsigned numbers inside GTK+ causing warnings. -- cgit v1.2.3