summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2010-10-17 04:11:21 -0600
committerScott Moreau <oreaus@gmail.com>2010-10-17 04:11:21 -0600
commitbd61f66bea7c67e1858d7433557a6e730658277d (patch)
treed8361d8f6da229a7d874b55f592e633fad928a6b
parent09f8853932b19a237e5be06017c9b2fd08d340d8 (diff)
downloadworkspacenames-master.tar.gz
workspacenames-master.tar.bz2
Properly center text.HEADmaster
-rw-r--r--src/workspacenames.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/workspacenames.cpp b/src/workspacenames.cpp
index d974ffc..ec57212 100644
--- a/src/workspacenames.cpp
+++ b/src/workspacenames.cpp
@@ -93,13 +93,13 @@ WSNamesScreen::drawText ()
float x, y, border = 10.0f;
CompRect oe = screen->getCurrentOutputExtents ();
- x = oe.centerX ();
+ x = oe.centerX () - textData.getWidth () / 2;
/* assign y (for the lower corner!) according to the setting */
switch (optionGetTextPlacement ())
{
case WorkspacenamesOptions::TextPlacementCenteredOnScreen:
- y = oe.centerY ();
+ y = oe.centerY () + textData.getHeight () / 2;
break;
case WorkspacenamesOptions::TextPlacementTopOfScreen:
case WorkspacenamesOptions::TextPlacementBottomOfScreen: