]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed wxScrollBar creation when default size was used
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 28 Feb 2003 23:41:00 +0000 (23:41 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 28 Feb 2003 23:41:00 +0000 (23:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/scrolbar.h
include/wx/gtk1/scrolbar.h
src/gtk/scrolbar.cpp
src/gtk1/scrolbar.cpp

index f471873aa3c75f73098c4b76e8a47e1b5d1ab30e..672334a1ded247ad9c0342e5a09601c3b971e0a1 100644 (file)
@@ -77,6 +77,9 @@ public:
     GtkAdjustment  *m_adjust;
     float           m_oldPos;
 
+protected:
+    virtual wxSize DoGetBestSize() const;
+
 private:
     DECLARE_DYNAMIC_CLASS(wxScrollBar)
 };
index f471873aa3c75f73098c4b76e8a47e1b5d1ab30e..672334a1ded247ad9c0342e5a09601c3b971e0a1 100644 (file)
@@ -77,6 +77,9 @@ public:
     GtkAdjustment  *m_adjust;
     float           m_oldPos;
 
+protected:
+    virtual wxSize DoGetBestSize() const;
+
 private:
     DECLARE_DYNAMIC_CLASS(wxScrollBar)
 };
index 14530aef2481d411d71545cdf940e7758575a60b..42fa93452df1121c0b1f2688c68a1176cec51ff7 100644 (file)
@@ -180,6 +180,8 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
 
     PostCreation();
 
+    SetBestSize(size);
+
     SetBackgroundColour( parent->GetBackgroundColour() );
 
     Show( TRUE );
@@ -334,4 +336,9 @@ void wxScrollBar::ApplyWidgetStyle()
     gtk_widget_set_style( m_widget, m_widgetStyle );
 }
 
+wxSize wxScrollBar::DoGetBestSize() const
+{
+    return wxControl::DoGetBestSize();
+}
+
 #endif
index 14530aef2481d411d71545cdf940e7758575a60b..42fa93452df1121c0b1f2688c68a1176cec51ff7 100644 (file)
@@ -180,6 +180,8 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
 
     PostCreation();
 
+    SetBestSize(size);
+
     SetBackgroundColour( parent->GetBackgroundColour() );
 
     Show( TRUE );
@@ -334,4 +336,9 @@ void wxScrollBar::ApplyWidgetStyle()
     gtk_widget_set_style( m_widget, m_widgetStyle );
 }
 
+wxSize wxScrollBar::DoGetBestSize() const
+{
+    return wxControl::DoGetBestSize();
+}
+
 #endif