Task 3: placement sizes are max(registry default, content minimum) so the outer border encloses each widget's content

27 widgets (18 dialogs, 2 calendars, 3 views, 4 choosers) get larger PaletteEntry defaults in lightgui/xframe/palette.py; canvas places at entry.default_w/default_h. New test Task3MinSizesTests asserts all 27; updated the AboutDialog size assertion in test_core.py. Full suite: 281 tests pass. Verified live under Xvfb: dialogs place at the new sizes (e.g. GtkAboutDialog 520x260). Two residual internal-layout collisions (TFindDialog Direction/Find Next, GtkFileChooserDialog Name/path) are draw-code issues, not placement size.
This commit is contained in:
cnmcdee committed 2026-12-02 04:31:38 +00:00
1 parent 5b0c6f02fd
commit 5a1ec47c6c
3 files changed
+71 -28

No files matched your search

+27 -27
View File
@@ -42,26 +42,26 @@ SECTIONS = (
)
PALETTE = (
PaletteEntry(0, 'GtkAboutDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'AboutDialog'),
PaletteEntry(0, 'GtkAboutDialog', 'Gtk', 'Windows & Dialogs', 0, 520, 260, 'Dialog', 'AboutDialog'),
PaletteEntry(1, 'GtkAccelLabel', 'Gtk', 'Display', 3, 180, 30, 'Label', 'AccelLabel'),
PaletteEntry(2, 'GtkActionBar', 'Gtk', 'Menus & Toolbars', 7, 200, 90, 'Container', 'ActionBar'),
PaletteEntry(3, 'GtkAppChooserButton', 'Gtk', 'Choosers', 5, 150, 36, 'Button', 'AppChooserButton'),
PaletteEntry(4, 'GtkAppChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'AppChooserDialog'),
PaletteEntry(5, 'GtkAppChooserWidget', 'Gtk', 'Choosers', 5, 200, 90, 'Container', 'AppChooserWidget'),
PaletteEntry(5, 'GtkAppChooserWidget', 'Gtk', 'Choosers', 5, 320, 240, 'Container', 'AppChooserWidget'),
PaletteEntry(6, 'GtkApplicationWindow', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Container', 'ApplicationWindow'),
PaletteEntry(7, 'GtkAspectFrame', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'AspectFrame'),
PaletteEntry(8, 'GtkAssistant', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'Assistant'),
PaletteEntry(8, 'GtkAssistant', 'Gtk', 'Windows & Dialogs', 0, 320, 280, 'Dialog', 'Assistant'),
PaletteEntry(9, 'GtkBox', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'Box'),
PaletteEntry(10, 'GtkButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'Button'),
PaletteEntry(11, 'GtkButtonBox', 'Gtk', 'Containers & Layout', 1, 150, 36, 'Container', 'ButtonBox'),
PaletteEntry(12, 'GtkCalendar', 'Gtk', 'Display', 3, 200, 90, 'Container', 'Calendar'),
PaletteEntry(12, 'GtkCalendar', 'Gtk', 'Display', 3, 260, 200, 'Container', 'Calendar'),
PaletteEntry(13, 'GtkCellView', 'Gtk', 'Display', 3, 200, 90, 'Display', 'CellView'),
PaletteEntry(14, 'GtkCenterBox', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'CenterBox'),
PaletteEntry(15, 'GtkCheckButton', 'Gtk', 'Buttons', 2, 150, 36, 'Toggle', 'CheckButton'),
PaletteEntry(16, 'GtkCheckMenuItem', 'Gtk', 'Menus & Toolbars', 7, 150, 36, 'Toggle', 'CheckMenuItem'),
PaletteEntry(17, 'GtkColorButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'ColorButton'),
PaletteEntry(18, 'GtkColorChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'ColorChooserDialog'),
PaletteEntry(19, 'GtkColorChooserWidget', 'Gtk', 'Choosers', 5, 200, 90, 'Container', 'ColorChooserWidget'),
PaletteEntry(18, 'GtkColorChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 340, 240, 'Dialog', 'ColorChooserDialog'),
PaletteEntry(19, 'GtkColorChooserWidget', 'Gtk', 'Choosers', 5, 340, 260, 'Container', 'ColorChooserWidget'),
PaletteEntry(20, 'GtkColorDialogButton', 'Gtk', 'Buttons', 2, 300, 220, 'Button', 'ColorDialogButton'),
PaletteEntry(21, 'GtkColumnView', 'Gtk', 'Views & Lists', 6, 260, 180, 'ListSel', 'ColumnView'),
PaletteEntry(22, 'GtkComboBox', 'Gtk', 'Text & Entry', 4, 180, 30, 'ListSel', 'ComboBox'),
@@ -75,13 +75,13 @@ PALETTE = (
PaletteEntry(30, 'GtkEventBox', 'Gtk', 'Misc / X', 8, 200, 90, 'Container', 'EventBox'),
PaletteEntry(31, 'GtkExpander', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'Expander'),
PaletteEntry(32, 'GtkFileChooserButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'FileChooserButton'),
PaletteEntry(33, 'GtkFileChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'FileChooserDialog'),
PaletteEntry(34, 'GtkFileChooserWidget', 'Gtk', 'Choosers', 5, 200, 90, 'Container', 'FileChooserWidget'),
PaletteEntry(33, 'GtkFileChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 360, 240, 'Dialog', 'FileChooserDialog'),
PaletteEntry(34, 'GtkFileChooserWidget', 'Gtk', 'Choosers', 5, 340, 260, 'Container', 'FileChooserWidget'),
PaletteEntry(35, 'GtkFixed', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'Fixed'),
PaletteEntry(36, 'GtkFlowBox', 'Gtk', 'Containers & Layout', 1, 200, 90, 'ListSel', 'FlowBox'),
PaletteEntry(37, 'GtkFontButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'FontButton'),
PaletteEntry(38, 'GtkFontChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'FontChooserDialog'),
PaletteEntry(39, 'GtkFontChooserWidget', 'Gtk', 'Choosers', 5, 200, 90, 'Container', 'FontChooserWidget'),
PaletteEntry(38, 'GtkFontChooserDialog', 'Gtk', 'Windows & Dialogs', 0, 340, 240, 'Dialog', 'FontChooserDialog'),
PaletteEntry(39, 'GtkFontChooserWidget', 'Gtk', 'Choosers', 5, 340, 260, 'Container', 'FontChooserWidget'),
PaletteEntry(40, 'GtkFrame', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'Frame'),
PaletteEntry(41, 'GtkGLArea', 'Gtk', 'Display', 3, 200, 90, 'Display', 'GLArea'),
PaletteEntry(42, 'GtkGrid', 'Gtk', 'Containers & Layout', 1, 260, 180, 'Container', 'Grid'),
@@ -113,7 +113,7 @@ PALETTE = (
PaletteEntry(68, 'GtkPicture', 'Gtk', 'Display', 3, 200, 90, 'Display', 'Picture'),
PaletteEntry(69, 'GtkPlacesSidebar', 'Gtk', 'Choosers', 5, 200, 90, 'Container', 'PlacesSidebar'),
PaletteEntry(70, 'GtkPopover', 'Gtk', 'Menus & Toolbars', 7, 200, 90, 'Container', 'Popover'),
PaletteEntry(71, 'GtkPrintUnixDialog', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'PrintUnixDialog'),
PaletteEntry(71, 'GtkPrintUnixDialog', 'Gtk', 'Windows & Dialogs', 0, 360, 300, 'Dialog', 'PrintUnixDialog'),
PaletteEntry(72, 'GtkProgressBar', 'Gtk', 'Display', 3, 180, 30, 'Range', 'ProgressBar'),
PaletteEntry(73, 'GtkRadioButton', 'Gtk', 'Buttons', 2, 150, 36, 'Toggle', 'RadioButton'),
PaletteEntry(74, 'GtkRadioMenuItem', 'Gtk', 'Menus & Toolbars', 7, 150, 36, 'Toggle', 'RadioMenuItem'),
@@ -126,7 +126,7 @@ PALETTE = (
PaletteEntry(81, 'GtkSearchEntry', 'Gtk', 'Text & Entry', 4, 180, 30, 'Entry', 'SearchEntry'),
PaletteEntry(82, 'GtkSeparator', 'Gtk', 'Containers & Layout', 1, 180, 30, 'Display', 'Separator'),
PaletteEntry(83, 'GtkSeparatorMenuItem', 'Gtk', 'Menus & Toolbars', 7, 180, 30, 'Display', 'SeparatorMenuItem'),
PaletteEntry(84, 'GtkShortcutsWindow', 'Gtk', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'ShortcutsWindow'),
PaletteEntry(84, 'GtkShortcutsWindow', 'Gtk', 'Windows & Dialogs', 0, 320, 300, 'Dialog', 'ShortcutsWindow'),
PaletteEntry(85, 'GtkSpinButton', 'Gtk', 'Text & Entry', 4, 150, 36, 'Range', 'SpinButton'),
PaletteEntry(86, 'GtkSpinner', 'Gtk', 'Display', 3, 150, 36, 'Display', 'Spinner'),
PaletteEntry(87, 'GtkStack', 'Gtk', 'Containers & Layout', 1, 260, 180, 'Container', 'Stack'),
@@ -139,7 +139,7 @@ PALETTE = (
PaletteEntry(94, 'GtkToggleToolButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'ToggleToolButton'),
PaletteEntry(95, 'GtkToolButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'ToolButton'),
PaletteEntry(96, 'GtkToolbar', 'Gtk', 'Menus & Toolbars', 7, 200, 90, 'ListSel', 'Toolbar'),
PaletteEntry(97, 'GtkTreeView', 'Gtk', 'Views & Lists', 6, 260, 180, 'ListSel', 'TreeView'),
PaletteEntry(97, 'GtkTreeView', 'Gtk', 'Views & Lists', 6, 320, 200, 'ListSel', 'TreeView'),
PaletteEntry(98, 'GtkVideo', 'Gtk', 'Display', 3, 200, 90, 'Display', 'Video'),
PaletteEntry(99, 'GtkViewport', 'Gtk', 'Containers & Layout', 1, 200, 90, 'Container', 'Viewport'),
PaletteEntry(100, 'GtkVolumeButton', 'Gtk', 'Buttons', 2, 150, 36, 'Button', 'VolumeButton'),
@@ -506,15 +506,15 @@ PALETTE = (
PaletteEntry(461, 'TButtonPanel', 'T', 'Buttons', 2, 150, 36, 'Container', 'ButtonPanel'),
PaletteEntry(462, 'TCalcEdit', 'T', 'Text & Entry', 4, 180, 30, 'Entry', 'CalcEdit'),
PaletteEntry(463, 'TCalculatorDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'CalculatorDialog'),
PaletteEntry(464, 'TCalendar', 'T', 'Display', 3, 200, 90, 'Container', 'Calendar'),
PaletteEntry(465, 'TCalendarDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'CalendarDialog'),
PaletteEntry(464, 'TCalendar', 'T', 'Display', 3, 260, 200, 'Container', 'Calendar'),
PaletteEntry(465, 'TCalendarDialog', 'T', 'Windows & Dialogs', 0, 320, 280, 'Dialog', 'CalendarDialog'),
PaletteEntry(466, 'TCheckBox', 'T', 'Buttons', 2, 150, 36, 'Toggle', 'CheckBox'),
PaletteEntry(467, 'TCheckComboBox', 'T', 'Buttons', 2, 150, 36, 'ListSel', 'CheckComboBox'),
PaletteEntry(468, 'TCheckGroup', 'T', 'Views & Lists', 6, 150, 36, 'ListSel', 'CheckGroup'),
PaletteEntry(469, 'TCheckListBox', 'T', 'Views & Lists', 6, 150, 36, 'ListSel', 'CheckListBox'),
PaletteEntry(470, 'TColorBox', 'T', 'Choosers', 5, 200, 90, 'ListSel', 'ColorBox'),
PaletteEntry(471, 'TColorButton', 'T', 'Choosers', 5, 150, 36, 'Button', 'ColorButton'),
PaletteEntry(472, 'TColorDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'ColorDialog'),
PaletteEntry(472, 'TColorDialog', 'T', 'Windows & Dialogs', 0, 520, 300, 'Dialog', 'ColorDialog'),
PaletteEntry(473, 'TColorListBox', 'T', 'Choosers', 5, 200, 90, 'ListSel', 'ColorListBox'),
PaletteEntry(474, 'TComboBox', 'T', 'Text & Entry', 4, 180, 30, 'ListSel', 'ComboBox'),
PaletteEntry(475, 'TComboBoxEx', 'T', 'Text & Entry', 4, 180, 30, 'ListSel', 'ComboBoxEx'),
@@ -529,10 +529,10 @@ PALETTE = (
PaletteEntry(484, 'TFileListBox', 'T', 'Choosers', 5, 200, 90, 'ListSel', 'FileListBox'),
PaletteEntry(485, 'TFileNameEdit', 'T', 'Text & Entry', 4, 180, 30, 'Entry', 'FileNameEdit'),
PaletteEntry(486, 'TFilterComboBox', 'T', 'Text & Entry', 4, 180, 30, 'ListSel', 'FilterComboBox'),
PaletteEntry(487, 'TFindDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'FindDialog'),
PaletteEntry(487, 'TFindDialog', 'T', 'Windows & Dialogs', 0, 380, 260, 'Dialog', 'FindDialog'),
PaletteEntry(488, 'TFloatSpinEdit', 'T', 'Text & Entry', 4, 150, 36, 'Range', 'FloatSpinEdit'),
PaletteEntry(489, 'TFlowPanel', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'FlowPanel'),
PaletteEntry(490, 'TFontDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'FontDialog'),
PaletteEntry(490, 'TFontDialog', 'T', 'Windows & Dialogs', 0, 320, 320, 'Dialog', 'FontDialog'),
PaletteEntry(491, 'TForm', 'T', 'Windows & Dialogs', 0, 300, 220, 'Container', 'Form'),
PaletteEntry(492, 'TFrame', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'Frame'),
PaletteEntry(493, 'TGroupBox', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'GroupBox'),
@@ -542,31 +542,31 @@ PALETTE = (
PaletteEntry(497, 'TLabel', 'T', 'Display', 3, 180, 30, 'Label', 'Label'),
PaletteEntry(498, 'TLabeledEdit', 'T', 'Text & Entry', 4, 180, 30, 'Entry', 'LabeledEdit'),
PaletteEntry(499, 'TListBox', 'T', 'Views & Lists', 6, 200, 90, 'ListSel', 'ListBox'),
PaletteEntry(500, 'TListView', 'T', 'Views & Lists', 6, 260, 180, 'ListSel', 'ListView'),
PaletteEntry(500, 'TListView', 'T', 'Views & Lists', 6, 320, 200, 'ListSel', 'ListView'),
PaletteEntry(501, 'TMainMenu', 'T', 'Menus & Toolbars', 7, 200, 90, 'ListSel', 'MainMenu'),
PaletteEntry(502, 'TMaskEdit', 'T', 'Text & Entry', 4, 180, 30, 'Entry', 'MaskEdit'),
PaletteEntry(503, 'TMemo', 'T', 'Text & Entry', 4, 260, 180, 'Entry', 'Memo'),
PaletteEntry(504, 'TNotebook', 'T', 'Containers & Layout', 1, 260, 180, 'Container', 'Notebook'),
PaletteEntry(505, 'TOpenDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'OpenDialog'),
PaletteEntry(506, 'TOpenPictureDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'OpenPictureDialog'),
PaletteEntry(506, 'TOpenPictureDialog', 'T', 'Windows & Dialogs', 0, 400, 240, 'Dialog', 'OpenPictureDialog'),
PaletteEntry(507, 'TPageControl', 'T', 'Containers & Layout', 1, 260, 180, 'Container', 'PageControl'),
PaletteEntry(508, 'TPageSetupDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'PageSetupDialog'),
PaletteEntry(508, 'TPageSetupDialog', 'T', 'Windows & Dialogs', 0, 320, 400, 'Dialog', 'PageSetupDialog'),
PaletteEntry(509, 'TPaintBox', 'T', 'Display', 3, 200, 90, 'Display', 'PaintBox'),
PaletteEntry(510, 'TPairSplitter', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'PairSplitter'),
PaletteEntry(511, 'TPanel', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'Panel'),
PaletteEntry(512, 'TPopupMenu', 'T', 'Menus & Toolbars', 7, 200, 90, 'ListSel', 'PopupMenu'),
PaletteEntry(513, 'TPopupNotifier', 'T', 'Menus & Toolbars', 7, 200, 90, 'Display', 'PopupNotifier'),
PaletteEntry(514, 'TPrintDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'PrintDialog'),
PaletteEntry(514, 'TPrintDialog', 'T', 'Windows & Dialogs', 0, 320, 300, 'Dialog', 'PrintDialog'),
PaletteEntry(515, 'TPrinterSetupDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'PrinterSetupDialog'),
PaletteEntry(516, 'TProgressBar', 'T', 'Display', 3, 180, 30, 'Range', 'ProgressBar'),
PaletteEntry(517, 'TRadioButton', 'T', 'Buttons', 2, 150, 36, 'Toggle', 'RadioButton'),
PaletteEntry(518, 'TRadioGroup', 'T', 'Views & Lists', 6, 150, 36, 'ListSel', 'RadioGroup'),
PaletteEntry(519, 'TReplaceDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'ReplaceDialog'),
PaletteEntry(519, 'TReplaceDialog', 'T', 'Windows & Dialogs', 0, 360, 260, 'Dialog', 'ReplaceDialog'),
PaletteEntry(520, 'TSaveDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'SaveDialog'),
PaletteEntry(521, 'TSavePictureDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'SavePictureDialog'),
PaletteEntry(521, 'TSavePictureDialog', 'T', 'Windows & Dialogs', 0, 400, 240, 'Dialog', 'SavePictureDialog'),
PaletteEntry(522, 'TScrollBar', 'T', 'Containers & Layout', 1, 180, 30, 'Range', 'ScrollBar'),
PaletteEntry(523, 'TScrollBox', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'ScrollBox'),
PaletteEntry(524, 'TSelectDirectoryDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'SelectDirectoryDialog'),
PaletteEntry(524, 'TSelectDirectoryDialog', 'T', 'Windows & Dialogs', 0, 360, 260, 'Dialog', 'SelectDirectoryDialog'),
PaletteEntry(525, 'TShape', 'T', 'Display', 3, 200, 90, 'Display', 'Shape'),
PaletteEntry(526, 'TShellListView', 'T', 'Views & Lists', 6, 260, 180, 'ListSel', 'ShellListView'),
PaletteEntry(527, 'TShellTreeView', 'T', 'Views & Lists', 6, 260, 180, 'ListSel', 'ShellTreeView'),
@@ -575,9 +575,9 @@ PALETTE = (
PaletteEntry(530, 'TSplitter', 'T', 'Containers & Layout', 1, 200, 90, 'Container', 'Splitter'),
PaletteEntry(531, 'TStaticText', 'T', 'Display', 3, 200, 90, 'Label', 'StaticText'),
PaletteEntry(532, 'TStatusBar', 'T', 'Display', 3, 180, 30, 'Container', 'StatusBar'),
PaletteEntry(533, 'TStringGrid', 'T', 'Views & Lists', 6, 260, 180, 'Container', 'StringGrid'),
PaletteEntry(533, 'TStringGrid', 'T', 'Views & Lists', 6, 360, 200, 'Container', 'StringGrid'),
PaletteEntry(534, 'TTabControl', 'T', 'Containers & Layout', 1, 260, 180, 'ListSel', 'TabControl'),
PaletteEntry(535, 'TTaskDialog', 'T', 'Windows & Dialogs', 0, 300, 220, 'Dialog', 'TaskDialog'),
PaletteEntry(535, 'TTaskDialog', 'T', 'Windows & Dialogs', 0, 340, 280, 'Dialog', 'TaskDialog'),
PaletteEntry(536, 'TTimeEdit', 'T', 'Display', 3, 180, 30, 'Entry', 'TimeEdit'),
PaletteEntry(537, 'TTimer', 'T', 'Display', 3, 200, 90, 'Display', 'Timer'),
PaletteEntry(538, 'TToggleBox', 'T', 'Buttons', 2, 150, 36, 'Toggle', 'ToggleBox'),
+2 -1
View File
@@ -33,7 +33,8 @@ class RegistryTests(unittest.TestCase):
self.assertEqual((widget.width, widget.height), (150, 36))
self.assertEqual(widget.archetype, "Button")
widget = core.create("GtkAboutDialog", "GtkAboutDialog_001")
self.assertEqual((widget.width, widget.height), (300, 220))
# Task 3: content-minimum size (was 300x220).
self.assertEqual((widget.width, widget.height), (520, 260))
def test_create_explicit_size(self):
widget = core.create("GtkButton", "B", 0, 0, 200, 50)
+42
View File
@@ -76,3 +76,45 @@ class PaletteTests(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
class Task3MinSizesTests(unittest.TestCase):
"""Task 3: placement sizes are max(registry default, content minimum)
so the outer border encloses the widget's fixed content."""
MIN_SIZES = {
"GtkAboutDialog": (520, 260),
"GtkAssistant": (320, 280),
"GtkColorChooserDialog": (340, 240),
"GtkFileChooserDialog": (360, 240),
"GtkFontChooserDialog": (340, 240),
"GtkPrintUnixDialog": (360, 300),
"GtkShortcutsWindow": (320, 300),
"TCalendarDialog": (320, 280),
"TColorDialog": (520, 300),
"TFindDialog": (380, 260),
"TFontDialog": (320, 320),
"TOpenPictureDialog": (400, 240),
"TPageSetupDialog": (320, 400),
"TPrintDialog": (320, 300),
"TReplaceDialog": (360, 260),
"TSavePictureDialog": (400, 240),
"TSelectDirectoryDialog": (360, 260),
"TTaskDialog": (340, 280),
"GtkCalendar": (260, 200),
"TCalendar": (260, 200),
"GtkTreeView": (320, 200),
"TListView": (320, 200),
"TStringGrid": (360, 200),
"GtkAppChooserWidget": (320, 240),
"GtkColorChooserWidget": (340, 260),
"GtkFileChooserWidget": (340, 260),
"GtkFontChooserWidget": (340, 260),
}
def test_min_sizes(self):
by_name = {e.name: e for e in palette.PALETTE}
self.assertEqual(len(self.MIN_SIZES), 27)
for name, (w, h) in self.MIN_SIZES.items():
entry = by_name[name]
self.assertEqual((entry.default_w, entry.default_h), (w, h), name)