* Improved spacing between the check boxen and the "Edit menu..." button.

* Simplified BBox labels (yes, there is a SetLabel(const char*) version :-))
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33446 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-10-05 18:22:43 +00:00
parent b4a7d0bcc6
commit 9bc8c04496

View File

@ -24,8 +24,8 @@
PreferencesWindow::PreferencesWindow(BRect frame)
:
BWindow(frame, "Deskbar Preferences", B_TITLED_WINDOW, B_NOT_RESIZABLE
| B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
BWindow(frame, "Deskbar Preferences", B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
{
// Controls
fMenuRecentDocuments = new BCheckBox("Recent Documents:",
@ -163,28 +163,14 @@ PreferencesWindow::PreferencesWindow(BRect frame)
fClockBox = new BBox("fClockBox");
fWindowBox = new BBox("fWindowBox");
BStringView* menuString = new BStringView(NULL, "Menu");
BStringView* appsString = new BStringView(NULL, "Applications");
BStringView* clockString = new BStringView(NULL, "Clock");
BStringView* windowString = new BStringView(NULL, "Window");
BFont font;
menuString->GetFont(&font);
font.SetFace(B_BOLD_FACE);
menuString->SetFont(&font, B_FONT_FACE);
appsString->SetFont(&font, B_FONT_FACE);
clockString->SetFont(&font, B_FONT_FACE);
windowString->SetFont(&font, B_FONT_FACE);
fMenuBox->SetLabel(menuString);
fAppsBox->SetLabel(appsString);
fClockBox->SetLabel(clockString);
fWindowBox->SetLabel(windowString);
fMenuBox->SetLabel("Menu");
fAppsBox->SetLabel("Applications");
fClockBox->SetLabel("Clock");
fWindowBox->SetLabel("Window");
BView* view;
view = BLayoutBuilder::Group<>()
.AddGroup(B_VERTICAL, 0)
.AddGroup(B_VERTICAL, 10)
.AddGroup(B_HORIZONTAL, 0)
.AddGroup(B_VERTICAL, 0)
.Add(fMenuRecentDocuments)
@ -199,7 +185,6 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.End()
.Add(new BButton("Edit Menu" B_UTF8_ELLIPSIS,
new BMessage(kEditMenuInTracker)))
.AddGlue()
.SetInsets(10, 10, 10, 10)
.End()
.View();
@ -256,18 +241,17 @@ PreferencesWindow::PreferencesWindow(BRect frame)
}
PreferencesWindow::~PreferencesWindow()
PreferencesWindow::~PreferencesWindow()
{
_UpdateRecentCounts();
be_app->PostMessage(kConfigClose);
}
void
void
PreferencesWindow::MessageReceived(BMessage* message)
{
switch (message->what) {
case kEditMenuInTracker:
OpenWithTracker(B_USER_DESKBAR_DIRECTORY);
break;
@ -288,7 +272,7 @@ PreferencesWindow::MessageReceived(BMessage* message)
}
void
void
PreferencesWindow::_UpdateRecentCounts()
{
BMessage message(kUpdateRecentCounts);
@ -318,7 +302,7 @@ PreferencesWindow::_UpdateRecentCounts()
}
void
void
PreferencesWindow::_EnableDisableDependentItems()
{
if (fAppsShowExpanders->Value())
@ -343,7 +327,7 @@ PreferencesWindow::_EnableDisableDependentItems()
}
void
void
PreferencesWindow::WindowActivated(bool active)
{
if (!active && IsMinimized())