Opened 8 years ago
Closed 7 years ago
#12981 closed bug (fixed)
BSpinner label not showing in some cases
Reported by: | zephjc | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | jessicah | |
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
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):
This is what it is supposed to look like:
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:
But is supposed to look like this:
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()
Attachments (1)
Change History (7)
comment:2 by , 8 years ago
Cc: | added |
---|---|
Summary: | BSpinner label now showing in some cases → BSpinner label not showing in some cases |
comment:3 by , 7 years ago
Component: | User Interface → Kits/Interface Kit |
---|---|
Owner: | changed from | to
by , 7 years ago
Attachment: | 0001-InterfaceKit-fixed-BSpinner-s-label-rendering.patch added |
---|
comment:4 by , 7 years ago
patch: | 0 → 1 |
---|
comment:5 by , 7 years ago
Added a possible fix: on a specific line a copy was created instead of a reference. P.S. that would lead to several values being uninitialized and rendering failed.
As a note, both UIs are using BGroupLayoutBuilder to generate the structure, so that might be related.
and damnit, the description of the ticket should be
"BSpinner label not showing in some cases"