Use more reasonable length for wxSlider in wxGTK by default
Use the same 100 DIPs as in wxMSW, to make the default behaviour more useful. Also update documentation to explain which size component should, and should not, be specified when creating the slider. Closes https://github.com/wxWidgets/wxWidgets/pull/2012
This commit is contained in:
		| @@ -571,6 +571,16 @@ int wxSlider::GetTickFreq() const | ||||
| #endif | ||||
| } | ||||
|  | ||||
| wxSize wxSlider::DoGetBestSize() const | ||||
| { | ||||
|     // We need to get the size in the transverse direction from GTK, but we use | ||||
|     // hard-coded default in the other direction, as otherwise the slider would | ||||
|     // have the smallest possible size and not have any extent at all. | ||||
|     wxSize size = GTKGetPreferredSize(m_widget); | ||||
|     (HasFlag(wxSL_VERTICAL) ? size.y : size.x) = 100; | ||||
|     return size; | ||||
| } | ||||
|  | ||||
| GdkWindow *wxSlider::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const | ||||
| { | ||||
| #ifdef __WXGTK3__ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user