diff --git a/src/preferences/cpufrequency/CPUFrequencyView.cpp b/src/preferences/cpufrequency/CPUFrequencyView.cpp index 8ec880ec72..b0e1adf6c2 100644 --- a/src/preferences/cpufrequency/CPUFrequencyView.cpp +++ b/src/preferences/cpufrequency/CPUFrequencyView.cpp @@ -64,18 +64,21 @@ CPUFrequencyView::CPUFrequencyView(BRect frame, BBox *dynamicBox = new BBox(rect, "dynamicBox"); dynamicBox->SetLabel(B_TRANSLATE("Dynamic stepping")); BGroupLayout* dynamicLayout = new BGroupLayout(B_VERTICAL); - dynamicLayout->SetInsets(10, dynamicBox->TopBorderOffset() * 2 + 10, 10, - 10); - dynamicLayout->SetSpacing(10); + dynamicLayout->SetInsets(B_USE_DEFAULT_SPACING, + dynamicBox->TopBorderOffset() * 2 + 10, + B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING); + dynamicLayout->SetSpacing(B_USE_DEFAULT_SPACING); dynamicBox->SetLayout(dynamicLayout); mainLayout->AddView(dynamicBox); fColorStepView = new ColorStepView(frame); fColorStepView->SetFrequencys(fDriverInterface.GetCpuFrequencyStates()); - fIntegrationTime = new BTextControl(BRect(0,0,Bounds().Width(),10), + fIntegrationTime = new BTextControl(BRect(0, 0, Bounds().Width(), 10), "intergal", B_TRANSLATE("Integration time [ms]: "), "", new BMessage(kIntegrationTimeChanged)); + fIntegrationTime->SetDivider(Bounds().Width() * 3 / 4); + fIntegrationTime->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT); dynamicLayout->AddView(fColorStepView); dynamicLayout->AddView(fIntegrationTime); @@ -97,8 +100,8 @@ CPUFrequencyView::CPUFrequencyView(BRect frame, new BMessage(kInstallIntoDeskbar)); statusLayout->AddView(fStatusView); - statusLayout->AddView(fInstallButton); statusLayout->AddItem(BSpaceLayoutItem::CreateGlue()); + statusLayout->AddView(fInstallButton); } diff --git a/src/preferences/cpufrequency/PreferencesWindow.h b/src/preferences/cpufrequency/PreferencesWindow.h index 914beec62b..03e99002a8 100644 --- a/src/preferences/cpufrequency/PreferencesWindow.h +++ b/src/preferences/cpufrequency/PreferencesWindow.h @@ -356,13 +356,10 @@ PreferencesWindow::PreferencesWindow(const char* title, BGroupView* buttonView = new BGroupView(B_HORIZONTAL); fDefaultButton = new BButton(B_TRANSLATE("Defaults"), new BMessage(kDefaultMsg)); - buttonView->AddChild(fDefaultButton); - buttonView->GetLayout()->AddItem( - BSpaceLayoutItem::CreateHorizontalStrut(7)); + fRevertButton = new BButton(B_TRANSLATE("Revert"), new BMessage(kRevertMsg)); - buttonView->AddChild(fRevertButton); buttonView->GetLayout()->AddItem(BSpaceLayoutItem::CreateGlue()); @@ -370,8 +367,8 @@ PreferencesWindow::PreferencesWindow(const char* title, SetLayout(new BGroupLayout(B_VERTICAL)); fRootLayout = new BGroupLayout(B_VERTICAL); - fRootLayout->SetInsets(10, 10, 10, 10); - fRootLayout->SetSpacing(10); + fRootLayout->SetInsets(B_USE_DEFAULT_SPACING); + fRootLayout->SetSpacing(B_USE_DEFAULT_SPACING); BView* rootView = new BView("root view", 0, fRootLayout); AddChild(rootView); rootView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));