From 63208ae886ea51ca41706f39aaf4987e8d077818 Mon Sep 17 00:00:00 2001 From: Joachim Seemer Date: Sat, 4 Jun 2011 18:37:04 +0000 Subject: [PATCH] Made the first column a bit wider,because it always truncated the Vision notification... Also changed the bit weird spacing to be a uniform DefaultItemSpacing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41910 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/sounds/HEventList.cpp | 4 ++-- src/preferences/sounds/HWindow.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/preferences/sounds/HEventList.cpp b/src/preferences/sounds/HEventList.cpp index f2ace9fcad..8ec36f34fc 100644 --- a/src/preferences/sounds/HEventList.cpp +++ b/src/preferences/sounds/HEventList.cpp @@ -60,9 +60,9 @@ HEventList::HEventList(const char* name) BColumnListView(name, 0, B_PLAIN_BORDER, true), fType(NULL) { - AddColumn(new BStringColumn(B_TRANSLATE("Event"), 150, 50, 500, + AddColumn(new BStringColumn(B_TRANSLATE("Event"), 180, 50, 500, B_TRUNCATE_MIDDLE), kEventColumn); - AddColumn(new BStringColumn(B_TRANSLATE("Sound"), 150, 50, 500, + AddColumn(new BStringColumn(B_TRANSLATE("Sound"), 130, 50, 500, B_TRUNCATE_END), kSoundColumn); } diff --git a/src/preferences/sounds/HWindow.cpp b/src/preferences/sounds/HWindow.cpp index 7781d422d6..8b0a92deae 100644 --- a/src/preferences/sounds/HWindow.cpp +++ b/src/preferences/sounds/HWindow.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -121,29 +122,30 @@ HWindow::InitGUI() new BMessage(M_PLAY_MESSAGE)); playbutton->SetEnabled(false); + const float kInset = be_control_look->DefaultItemSpacing(); view->SetLayout(new BGroupLayout(B_HORIZONTAL)); - view->AddChild(BGroupLayoutBuilder(B_VERTICAL, 15) + view->AddChild(BGroupLayoutBuilder(B_VERTICAL, kInset) .AddGroup(B_HORIZONTAL) .Add(menuField) .AddGlue() .End() - .AddGroup(B_HORIZONTAL, 15) + .AddGroup(B_HORIZONTAL, kInset) .AddGlue() .Add(playbutton) .Add(stopbutton) .End() - .SetInsets(15, 15, 15, 15) + .SetInsets(kInset, kInset, kInset, kInset) ); box->AddChild(view); SetLayout(new BGroupLayout(B_HORIZONTAL)); AddChild(BGroupLayoutBuilder(B_VERTICAL) - .AddGroup(B_VERTICAL, 20) + .AddGroup(B_VERTICAL, kInset) .Add(fEventList) .Add(box) .End() - .SetInsets(12, 28, 12, 12) + .SetInsets(kInset, kInset, kInset, kInset) ); // setup file menu