mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Cleanup: use DoGetBestClientSize
This commit is contained in:
@@ -265,14 +265,13 @@ void GalleryList::onChar(wxKeyEvent& ev) {
|
||||
}
|
||||
}
|
||||
|
||||
wxSize GalleryList::DoGetBestSize() const {
|
||||
wxSize ws = GetSize(), cs = GetClientSize();
|
||||
wxSize GalleryList::DoGetBestClientSize() const {
|
||||
const int w = item_size.x + 2*MARGIN + 2*BORDER;
|
||||
const int h = item_size.y + 2*MARGIN + 2*BORDER;
|
||||
if (direction == wxHORIZONTAL) {
|
||||
return wxSize(w, h * (int)column_count) + ws - cs;
|
||||
return wxSize(w, h * (int)column_count);
|
||||
} else {
|
||||
return wxSize(w * (int)column_count, h) + ws - cs;
|
||||
return wxSize(w * (int)column_count, h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class GalleryList : public wxPanel {
|
||||
virtual void onSelect(size_t item, size_t col, bool& changes) {}
|
||||
|
||||
/// Return the desired size of control
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual wxSize DoGetBestClientSize() const;
|
||||
|
||||
/// Information on the subcolumns. These are columns inside items
|
||||
struct SubColumn {
|
||||
|
||||
Reference in New Issue
Block a user