#12981: BSpinner label now showing in some cases
----------------------------+------------------------------
Reporter: zephjc | Owner: stippi
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: User Interface | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: x86 |
----------------------------+------------------------------
In WebPositive, in the Settings window, the label for the spinner control
is missing (at the bottom of the window, just above the Apply and Cancel
buttons):
[[Image(http://i.imgur.com/IEj7VNQ.png)]]
This is what it is supposed to look like:
[[Image(http://i.imgur.com/ZNQWqhp.png)]]
I've been trying to debug with basic logging in
BAbstractSpinner::_DrawLabel and even in BControlLook::DrawLabel, but the
label value seems to be retained the whole way through.
The only "fix" I've found for the WebPositive problem is altering where
fDaysInHistory is instantiated, moving it from before the
fShowTabsIfOnlyOnePage setup to after it, in
src/apps/webpositive/SettingsWindow.cpp ~L308
{{{
diff --git a/src/apps/webpositive/SettingsWindow.cpp
b/src/apps/webpositive/SettingsWindow.cpp
index a6ab410..438b88c 100644
--- a/src/apps/webpositive/SettingsWindow.cpp
+++ b/src/apps/webpositive/SettingsWindow.cpp
@@ -305,6 +305,12 @@ SettingsWindow::_CreateGeneralPage(float spacing)
fNewTabBehaviorMenu = new BMenuField("new tab behavior",
B_TRANSLATE("New tabs:"), newTabBehaviorMenu);
+
+ fShowTabsIfOnlyOnePage = new BCheckBox("show tabs if only one
page",
+ B_TRANSLATE("Show tabs if only one page is open"),
+ new BMessage(MSG_TAB_DISPLAY_BEHAVIOR_CHANGED));
+ fShowTabsIfOnlyOnePage->SetValue(B_CONTROL_ON);
+
fDaysInHistory = new BSpinner("days in history",
B_TRANSLATE("Number of days to keep links in History
menu:"),
new BMessage(MSG_HISTORY_MENU_DAYS_CHANGED));
@@ -312,11 +318,6 @@ SettingsWindow::_CreateGeneralPage(float spacing)
fDaysInHistory->SetValue(
BrowsingHistory::DefaultInstance()->MaxHistoryItemAge());
- fShowTabsIfOnlyOnePage = new BCheckBox("show tabs if only one
page",
- B_TRANSLATE("Show tabs if only one page is open"),
- new BMessage(MSG_TAB_DISPLAY_BEHAVIOR_CHANGED));
- fShowTabsIfOnlyOnePage->SetValue(B_CONTROL_ON);
-
fAutoHideInterfaceInFullscreenMode = new BCheckBox("auto-hide
interface",
B_TRANSLATE("Auto-hide interface in full screen mode"),
new BMessage(MSG_AUTO_HIDE_INTERFACE_BEHAVIOR_CHANGED));
}}}
Likewise, the SerialConnect app has a similar problem with the Baud Rate
window (Settings -> Baud Rate -> Custom) which looks like this:
[[Image(http://i.imgur.com/zWiMkUV.png)]]
But is supposed to look like this:
[[Image(http://i.imgur.com/IpiUtL9.png)]]
with the label showing.
This change fixes it, but all the change does is move the fSpinner
instantiation outside the Add() call and onto its own line:
{{{
diff --git a/src/apps/serialconnect/CustomRateWindow.cpp
b/src/apps/serialconnect/CustomRateWindow.cpp
index 53eb5e4..64eb92e 100644
--- a/src/apps/serialconnect/CustomRateWindow.cpp
+++ b/src/apps/serialconnect/CustomRateWindow.cpp
@@ -30,11 +30,13 @@ CustomRateWindow::CustomRateWindow(int baudrate)
BGroupView* root = new BGroupView(B_VERTICAL);
AddChild(root);
+ fSpinner = new BSpinner("spin", B_TRANSLATE("Baudrate:"), NULL);
+
BGroupLayoutBuilder(root)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING)
.AddGroup(B_HORIZONTAL)
- .Add(fSpinner = new BSpinner("spin",
B_TRANSLATE("Baudrate:"), NULL))
+ .Add(fSpinner)
.End()
.AddGroup(B_HORIZONTAL)
.AddGlue()
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12981>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.