[haiku-commits] r42222 - in haiku/trunk: headers/os/interface src/kits/interface

  • From: yourpalal2@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 18 Jun 2011 02:37:40 +0200 (CEST)

Author: yourpalal
Date: 2011-06-18 02:37:39 +0200 (Sat, 18 Jun 2011)
New Revision: 42222
Changeset: https://dev.haiku-os.org/changeset/42222
Ticket: https://dev.haiku-os.org/ticket/7447

Modified:
   haiku/trunk/headers/os/interface/InterfaceDefs.h
   haiku/trunk/src/kits/interface/ControlLook.cpp
Log:
Change the value of other spacing/inset constants so that B_USE_DEFAULT_SPACING 
has its own unique value. Also adjust BControlLook::ComposeSpacing() to reflect 
this.
closes #7447


Modified: haiku/trunk/headers/os/interface/InterfaceDefs.h
===================================================================
--- haiku/trunk/headers/os/interface/InterfaceDefs.h    2011-06-17 22:56:11 UTC 
(rev 42221)
+++ haiku/trunk/headers/os/interface/InterfaceDefs.h    2011-06-18 00:37:39 UTC 
(rev 42222)
@@ -229,16 +229,16 @@
 
 enum {
        B_USE_DEFAULT_SPACING = -2,
-       B_USE_ITEM_SPACING = -2,
-       B_USE_ITEM_INSETS = -2,
-       B_USE_HALF_ITEM_SPACING = -3,
-       B_USE_HALF_ITEM_INSETS = -3,
-       B_USE_WINDOW_INSETS = -4,
-       B_USE_WINDOW_SPACING = -4,
-       B_USE_SMALL_INSETS = -5,
-       B_USE_SMALL_SPACING = -5,
-       B_USE_BIG_INSETS = -6,
-       B_USE_BIG_SPACING = -6
+       B_USE_ITEM_SPACING = -3,
+       B_USE_ITEM_INSETS = -3,
+       B_USE_HALF_ITEM_SPACING = -4,
+       B_USE_HALF_ITEM_INSETS = -4,
+       B_USE_WINDOW_INSETS = -5,
+       B_USE_WINDOW_SPACING = -5,
+       B_USE_SMALL_INSETS = -6,
+       B_USE_SMALL_SPACING = -6,
+       B_USE_BIG_INSETS = -7,
+       B_USE_BIG_SPACING = -7
 };
 
 

Modified: haiku/trunk/src/kits/interface/ControlLook.cpp
===================================================================
--- haiku/trunk/src/kits/interface/ControlLook.cpp      2011-06-17 22:56:11 UTC 
(rev 42221)
+++ haiku/trunk/src/kits/interface/ControlLook.cpp      2011-06-18 00:37:39 UTC 
(rev 42222)
@@ -53,8 +53,7 @@
 float
 BControlLook::ComposeSpacing(float spacing)
 {
-       // We only need to check one of each synonym (B_*_SPACING | B_*_INSETS)
-       if (spacing == B_USE_ITEM_SPACING) {
+       if (spacing == B_USE_DEFAULT_SPACING || spacing == B_USE_ITEM_SPACING) {
                return be_control_look->DefaultItemSpacing();
        } else if (spacing == B_USE_HALF_ITEM_SPACING) {
                return be_control_look->DefaultItemSpacing() * 0.5f;


Other related posts:

  • » [haiku-commits] r42222 - in haiku/trunk: headers/os/interface src/kits/interface - yourpalal2