Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:hig:panel-plugins [2012/05/09 15:45] – [Monitor] andrzejr | dev:hig:panel-plugins [2012/06/13 21:14] – [Size] landry | ||
---|---|---|---|
Line 68: | Line 68: | ||
Labels should be oriented horizontally in the horizontal and deskbar mode and vertically (rotated clockwise) in the vertical mode. | Labels should be oriented horizontally in the horizontal and deskbar mode and vertically (rotated clockwise) in the vertical mode. | ||
- | (RFC) For consistency with orther | + | (RFC) For consistency with other panel plugins and for good aligning of plugins in the panel, I'd suggest aligning all labels to the left edge of the plugin, or icon, if present. Currently many plugins center their labels, which looks poorly in the deskbar mode, or if multiple rows are used in other modes. |
If plugin displays multiple rows of labels, it should preserve their native spacing (e.g. vbox with labels should be wrapped with a GtkAdjustment widget to prevent expanding the box). | If plugin displays multiple rows of labels, it should preserve their native spacing (e.g. vbox with labels should be wrapped with a GtkAdjustment widget to prevent expanding the box). | ||
Line 114: | Line 114: | ||
===== Panel properties ===== | ===== Panel properties ===== | ||
- | ==== mode ==== | + | ==== Mode ==== |
- | The panel (starting with 4.10) has 3 modes : horizontal, vertical and deskbar. A plugin should layout its widgets following those rules : | + | The panel has three modes: horizontal, vertical, and deskbar. |
- | * use a vertical XfceHVBox if the panel is in vertical or deskbar mode, horizontal otherwise. | + | |
- | * labels should be oriented vertically (using '' | + | |
- | * progressbars should be oriented vertically in horizontal mode, horizontally otherwise. | + | |
- | ==== size ==== | + | === Horizontal mode === |
- | Plugins should be tested to still render fine in all panel sizes, starting from 16px to 40px at least. | + | * Widgets are placed horizontally |
+ | * Progressbars are placed vertically | ||
- | The exception is a deskbar | + | === Vertical |
- | * a single row is used - in such a case plugins should resort to displaying icons only. Plugins which must display text or input fields | + | * Widgets |
- | * look " | + | * Labels are rotated |
+ | * Progressbars are placed horizontally | ||
+ | === Deskbar mode === | ||
+ | * Widgets are placed vertically | ||
+ | * Composited widgets can be packed horizontally | ||
+ | * Labels are not rotated | ||
+ | * Progressbars are placed horizontally | ||
+ | |||
+ | ==== Size ==== | ||
+ | |||
+ | The panel can be made from 16px tall to 128px tall, multiplied by the amount of rows : that makes a lot of combinaisons to test when designing an UI for a plugin, and one should try to make its UI consistent and usable in most sizes. | ||
+ | |||
+ | ==== Widgets padding/ | ||
+ | |||
+ | Widgets padding/ | ||
+ | |||
+ | * Plugins have to set their container border width with '' | ||
+ | * When displaying a frame around the plugin, the border has to be 0px for a size of < 26px and 1px otherwise. | ||
+ | * Plugins can set a default spacing between childs in the container via the //spacing// parameter to '' | ||
+ | * Labels should be packed (via '' | ||
+ | * Progressbars, | ||
+ | * Progressbars should be 8px wide (when vertical, 8px tall when horizontal), | ||
+ | |||
+ | ==== event box ==== | ||
+ | If the plugin has an eventbox (to receive clicks or such), it should be made invisible to avoid problems with transparent/ | ||
+ | < | ||
+ | gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), | ||
+ | gtk_event_box_set_above_child(GTK_EVENT_BOX(ebox), | ||
+ | </ | ||
==== number of rows ==== | ==== number of rows ==== | ||