Added some config buttons that both look better and also look clickable (like buttons should)
Updated the layout code to be font sensitive git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19585 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9a4b4c617b
commit
db5fdafdc7
@ -126,15 +126,16 @@ ConfigWindow::ConfigWindow(config_setup_kind kind, Printer* defaultPrinter, BMes
|
|||||||
|
|
||||||
AddChild(panel);
|
AddChild(panel);
|
||||||
|
|
||||||
float left = 10, top = 5;
|
float left = 10, top = 10;
|
||||||
BRect r(left, top, 160, 15);
|
BRect r(left, top, 160, 20);
|
||||||
|
|
||||||
// print selection popup menu
|
// print selection popup menu
|
||||||
BPopUpMenu* menu = new BPopUpMenu("Select a Printer");
|
BPopUpMenu* menu = new BPopUpMenu("Select a Printer");
|
||||||
SetupPrintersMenu(menu);
|
SetupPrintersMenu(menu);
|
||||||
|
|
||||||
fPrinters = new BMenuField(r, "Printer", "Printer", menu);
|
r.right = r.left + be_plain_font->StringWidth("Printer:") + menu->MaxContentWidth() + 10;
|
||||||
fPrinters->SetDivider(40);
|
fPrinters = new BMenuField(r, "Printer", "Printer:", menu);
|
||||||
|
fPrinters->SetDivider(be_plain_font->StringWidth("Printer:") + 10);
|
||||||
panel->AddChild(fPrinters);
|
panel->AddChild(fPrinters);
|
||||||
top += fPrinters->Bounds().Height() + 10;
|
top += fPrinters->Bounds().Height() + 10;
|
||||||
|
|
||||||
@ -142,11 +143,14 @@ ConfigWindow::ConfigWindow(config_setup_kind kind, Printer* defaultPrinter, BMes
|
|||||||
r.OffsetTo(left, top);
|
r.OffsetTo(left, top);
|
||||||
fPageSetup = AddPictureButton(panel, r, "Page Format", "PAGE_SETUP_ON", "PAGE_SETUP_OFF", MSG_PAGE_SETUP);
|
fPageSetup = AddPictureButton(panel, r, "Page Format", "PAGE_SETUP_ON", "PAGE_SETUP_OFF", MSG_PAGE_SETUP);
|
||||||
// add description to button
|
// add description to button
|
||||||
r.OffsetTo(left + fPageSetup->Bounds().Width() + 5, top + 5);
|
r.OffsetTo(left + fPageSetup->Bounds().Width() + 5, fPageSetup->Frame().top);
|
||||||
AddStringView(panel, r, "Setup page format");
|
BStringView *stringView = AddStringView(panel, r, "Paper Setup:");
|
||||||
r.OffsetBy(0, 10);
|
stringView->ResizeToPreferred();
|
||||||
|
r = stringView->Frame();
|
||||||
|
r.right = panel->Bounds().right;
|
||||||
|
r.OffsetBy(0, r.Height());
|
||||||
fPageFormatText = AddStringView(panel, r, "");
|
fPageFormatText = AddStringView(panel, r, "");
|
||||||
top += fPageSetup->Bounds().Height() + 5;
|
top = fPageSetup->Frame().bottom + 15;
|
||||||
|
|
||||||
// page selection button
|
// page selection button
|
||||||
fJobSetup = NULL;
|
fJobSetup = NULL;
|
||||||
@ -154,11 +158,12 @@ ConfigWindow::ConfigWindow(config_setup_kind kind, Printer* defaultPrinter, BMes
|
|||||||
r.OffsetTo(left, top);
|
r.OffsetTo(left, top);
|
||||||
fJobSetup = AddPictureButton(panel, r, "Page Selection", "JOB_SETUP_ON", "JOB_SETUP_OFF", MSG_JOB_SETUP);
|
fJobSetup = AddPictureButton(panel, r, "Page Selection", "JOB_SETUP_ON", "JOB_SETUP_OFF", MSG_JOB_SETUP);
|
||||||
// add description to button
|
// add description to button
|
||||||
r.OffsetTo(left + fJobSetup->Bounds().Width() + 5, top + 5);
|
r.OffsetTo(left + fJobSetup->Bounds().Width() + 5, top);
|
||||||
AddStringView(panel, r, "Setup print job");
|
stringView = AddStringView(panel, r, "Pages to Print:");
|
||||||
r.OffsetBy(0, 10);
|
stringView->ResizeToPreferred();
|
||||||
|
r.OffsetBy(0, stringView->Frame().Height());
|
||||||
fJobSetupText = AddStringView(panel, r, "");
|
fJobSetupText = AddStringView(panel, r, "");
|
||||||
top += fJobSetup->Bounds().Height() + 5;
|
top = fJobSetup->Frame().bottom + 15;
|
||||||
}
|
}
|
||||||
top += 5;
|
top += 5;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user