Adjust entry width of wxSpinCtrl in wxGTK to its range
Ensure that the entry is always (just) big enough to show any value valid in this spin control. This also ensures that GetBestSize() doesn't need to be overridden to use GetSizeFromTextSize() any longer as the best size will be determined correctly by GTK itself.
This commit is contained in:
@@ -71,7 +71,9 @@ protected:
|
||||
void GtkDisableEvents() const;
|
||||
void GtkEnableEvents() const;
|
||||
|
||||
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
||||
// Update the number of digits used to match our range (and base).
|
||||
void GtkSetEntryWidth();
|
||||
|
||||
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE;
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
|
||||
|
||||
|
Reference in New Issue
Block a user