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