Tracker: File panel misc style fixes

Change-Id: I6376e52d26ac05e0f591c2484a7c7301cee6166b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9523
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
John Scipione
2025-07-28 12:34:49 +00:00
parent 24f4871106
commit abc4a28949
+7 -8
View File
@@ -1164,8 +1164,7 @@ TFilePanel::SetButtonLabel(file_panel_button selector, const char* text)
switch (selector) {
case B_CANCEL_BUTTON:
{
BButton* button
= dynamic_cast<BButton*>(FindView("cancel button"));
BButton* button = dynamic_cast<BButton*>(FindView("cancel button"));
if (button == NULL)
break;
@@ -1176,15 +1175,14 @@ TFilePanel::SetButtonLabel(file_panel_button selector, const char* text)
button->MoveBy(delta, 0);
button->ResizeBy(-delta, 0);
}
}
break;
}
case B_DEFAULT_BUTTON:
{
fButtonText = text;
float delta = 0;
BButton* button
= dynamic_cast<BButton*>(FindView("default button"));
BButton* button = dynamic_cast<BButton*>(FindView("default button"));
if (button != NULL) {
float old_width = button->StringWidth(button->Label());
button->SetLabel(text);
@@ -1199,9 +1197,10 @@ TFilePanel::SetButtonLabel(file_panel_button selector, const char* text)
button = dynamic_cast<BButton*>(FindView("cancel button"));
if (button != NULL)
button->MoveBy(delta, 0);
}
break;
}
}
}
@@ -1211,8 +1210,7 @@ TFilePanel::SetSaveText(const char* text)
if (text == NULL)
return;
BTextControl* textControl
= dynamic_cast<BTextControl*>(FindView("text view"));
BTextControl* textControl = dynamic_cast<BTextControl*>(FindView("text view"));
if (textControl != NULL) {
textControl->SetText(text);
if (textControl->TextView() != NULL)
@@ -1410,6 +1408,7 @@ TFilePanel::MessageReceived(BMessage* message)
HandleSaveButton();
} else
HandleOpenButton();
break;
case B_OBSERVER_NOTICE_CHANGE: