Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:hig:panel-plugins [2012/06/03 18:53] – [Size] mikedev:hig:panel-plugins [2012/06/14 15:06] (current) – [Size] landry
Line 135: Line 135:
 ==== Size ==== ==== Size ====
  
-Two category of sizes can be distinguished for the panelsmall and large size.+The panel can be made from 16px tall to 128px tall, multiplied by the amount of rows that makes a lot of combinations to test when designing an UI for a plugin, and one should try to make its UI consistent and usable in most sizes.
  
-=== Padding ===+==== Widgets padding/size ====
  
-  * Plugins that include a padding have to stick to 1px for a size < 28 and 2px otherwise.+Widgets padding/size is important for consistency :
  
 +  * Plugins have to set their container border width with ''gtk_container_set_border_width()'' to 1px for a panel size < 26px and 2px otherwise. Adjust it in the ''size-changed'' callback, which is called anyway in the panel creation.
 +  * 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 children in the container via the //spacing// parameter to ''xfce_hvbox_new()''
 +  * Labels should be packed (via ''gtk_box_pack_start()'' or ''gtk_container_add()'') with a 2px padding.
 +  * Progressbars, images and buttons should be packed with a 0px padding
 +  * Progressbars should be 8px wide (when vertical, 8px tall when horizontal), use -1 for the other size to let the parent widget set the size.
 +
 +==== event box ====
 +If the plugin has an eventbox (to receive clicks or such), it should be made invisible to avoid problems with transparent/coloured panels. It should also be above its childs to actually receive events.
 +<code>
 +gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), FALSE);
 +gtk_event_box_set_above_child(GTK_EVENT_BOX(ebox), TRUE);
 +</code>
 ==== number of rows ==== ==== number of rows ====