summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-12-17 18:40:46 +0100
committerGravatar Nikias Bassen2009-12-17 18:40:46 +0100
commit34161d4922ed768bf62079e83494c01d90e08ec4 (patch)
tree3a3a251cea3b7ab44842121bf5bb7b77c8d1da1c /src
parent1fb844bdadb3d25f6818da256840653439e940a4 (diff)
downloadsbmanager-34161d4922ed768bf62079e83494c01d90e08ec4.tar.gz
sbmanager-34161d4922ed768bf62079e83494c01d90e08ec4.tar.bz2
Use defines to set stage width and height where appropriate
Signed-off-by: Nikias Bassen <nikias@gmx.li>
Diffstat (limited to 'src')
-rw-r--r--src/sbmanager.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c
index cb69606..ced6083 100644
--- a/src/sbmanager.c
+++ b/src/sbmanager.c
@@ -34,6 +34,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "../data/data.h"
+#define STAGE_WIDTH 320
+#define STAGE_HEIGHT 480
+#define DOCK_HEIGHT 90
+
const char CLOCK_FONT[] = "FreeSans Bold 12px";
ClutterColor clock_text_color = {255, 255, 255, 210};
@@ -53,7 +57,7 @@ typedef struct {
gboolean is_dock_item;
} SBItem;
-const ClutterActorBox dock_area = {0.0, 390.0, 320.0, 480.0};
+const ClutterActorBox dock_area = {0.0, STAGE_HEIGHT - DOCK_HEIGHT, STAGE_WIDTH, STAGE_HEIGHT};
ClutterActor *stage = NULL;
ClutterActor *clock_label = NULL;
@@ -386,7 +390,7 @@ static void dock_align_icons()
spacing = 3.0;
}
gfloat totalwidth = count*60.0 + spacing*(count-1);
- xpos = (320.0 - totalwidth)/2.0;
+ xpos = (STAGE_WIDTH - totalwidth)/2.0;
gfloat cx = 0.0;
gfloat cy = 0.0;
@@ -602,7 +606,7 @@ int main(int argc, char **argv)
/* Set the size of the widget, because we should not set the size of its
* stage when using GtkClutterEmbed.
*/
- gtk_widget_set_size_request (clutter_widget, 320, 480);
+ gtk_widget_set_size_request (clutter_widget, STAGE_WIDTH, STAGE_HEIGHT);
/* Get the stage and set its size and color: */
stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (clutter_widget));