]> Dogcows Code - chaz/openbox/blobdiff - src/frame.cc
labels are higher than buttons too
[chaz/openbox] / src / frame.cc
index 2f0835eed9abef468c9b12e38c51d1e58f9175cb..d846692e0eb3417466343e8e3d5d8ab75b639bc0 100644 (file)
@@ -446,11 +446,13 @@ void Frame::renderLabel()
     otk::pixel32 *dest = s->pixelData(), *src;
     int w = _title_sur->size().width();
   
-    src = _title_sur->pixelData() + w * (geom.bevel + 1) + geom.title_x;
+    src = _title_sur->pixelData() + w * geom.bevel + geom.title_x;
     
     // get the background under the label
-    for (int y = 0; y < geom.button_size; ++y, src += w - geom.button_size)
-      for (int x = 0; x < geom.button_size; ++x, ++dest, ++src)
+    int xd = s->size().width();
+    int yd = s->size().height();
+    for (int y = 0; y < yd; ++y, src += w - xd)
+      for (int x = 0; x < xd; ++x, ++dest, ++src)
         *dest = *src;
     control->drawImage(*s, 0, 0, 0); // no image but draw the new background
   } else
This page took 0.023435 seconds and 4 git commands to generate.