package_daemon: fix regressions from Set*UIColor merge.
Also use Set*UIColor where appropriate.
This commit is contained in:
parent
ed749c6221
commit
5d7e699ade
|
@ -210,25 +210,22 @@ ProblemWindow::_ClearProblemsGui()
|
|||
void
|
||||
ProblemWindow::_AddProblemsGui(BSolver* solver)
|
||||
{
|
||||
rgb_color evenBackground = ui_color(B_LIST_BACKGROUND_COLOR);
|
||||
rgb_color oddBackground = tint_color(evenBackground, 1.04);
|
||||
|
||||
int32 problemCount = solver->CountProblems();
|
||||
for (int32 i = 0; i < problemCount; i++) {
|
||||
_AddProblem(solver->ProblemAt(i),
|
||||
(i & 1) == 0 ? evenBackground : oddBackground);
|
||||
(i & 1) == 0 ? B_NO_TINT : 1.04);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProblemWindow::_AddProblem(BSolverProblem* problem,
|
||||
const rgb_color& backgroundColor)
|
||||
const float backgroundTint)
|
||||
{
|
||||
BGroupView* problemGroup = new BGroupView(B_VERTICAL);
|
||||
fContainerView->AddChild(problemGroup);
|
||||
problemGroup->GroupLayout()->SetInsets(B_USE_SMALL_INSETS);
|
||||
problemGroup->SetViewColor(backgroundColor);
|
||||
problemGroup->SetViewUIColor(B_LIST_BACKGROUND_COLOR, backgroundTint);
|
||||
|
||||
BStringView* problemView = new BStringView(NULL, problem->ToString());
|
||||
problemGroup->AddChild(problemView);
|
||||
|
@ -236,6 +233,7 @@ ProblemWindow::_AddProblem(BSolverProblem* problem,
|
|||
problemView->GetFont(&problemFont);
|
||||
problemFont.SetFace(B_BOLD_FACE);
|
||||
problemView->SetFont(&problemFont);
|
||||
problemView->AdoptParentColors();
|
||||
|
||||
int32 solutionCount = problem->CountSolutions();
|
||||
for (int32 k = 0; k < solutionCount; k++) {
|
||||
|
@ -257,6 +255,7 @@ ProblemWindow::_AddProblem(BSolverProblem* problem,
|
|||
BString().SetToFormat("- %s",
|
||||
_SolutionElementText(element).String()));
|
||||
elementsGroup->AddView(elementView);
|
||||
elementView->AdoptParentColors();
|
||||
}
|
||||
|
||||
fSolutions[solutionButton] = Solution(problem, solution);
|
||||
|
|
|
@ -56,7 +56,7 @@ private:
|
|||
void _ClearProblemsGui();
|
||||
void _AddProblemsGui(BSolver* solver);
|
||||
void _AddProblem(BSolverProblem* problem,
|
||||
const rgb_color& backgroundColor);
|
||||
const float backgroundTint);
|
||||
BString _SolutionElementText(
|
||||
const BSolverProblemSolutionElement*
|
||||
element) const;
|
||||
|
|
|
@ -89,15 +89,16 @@ ResultWindow::AddLocationChanges(const char* location,
|
|||
|
||||
locationGroup->GroupLayout()->SetInsets(B_USE_SMALL_INSETS);
|
||||
|
||||
rgb_color background = ui_color(B_LIST_BACKGROUND_COLOR);
|
||||
float backgroundTint = B_NO_TINT;
|
||||
if ((fContainerView->CountChildren() & 1) != 0)
|
||||
background = tint_color(background, 1.04);
|
||||
locationGroup->SetViewColor(background);
|
||||
backgroundTint = 1.04;
|
||||
locationGroup->SetViewUIColor(B_LIST_BACKGROUND_COLOR, backgroundTint);
|
||||
|
||||
BStringView* locationView = new BStringView(NULL,
|
||||
BString().SetToFormat("in %s:", location));
|
||||
locationGroup->AddChild(locationView);
|
||||
locationView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
||||
locationView->AdoptParentColors();
|
||||
BFont locationFont;
|
||||
locationView->GetFont(&locationFont);
|
||||
locationFont.SetFace(B_BOLD_FACE);
|
||||
|
@ -207,6 +208,7 @@ ResultWindow::_AddPackages(BGroupLayout* packagesGroup,
|
|||
BStringView* packageView = new BStringView(NULL, text);
|
||||
packagesGroup->AddView(packageView);
|
||||
packageView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
||||
packageView->AdoptParentColors();
|
||||
|
||||
packagesAdded = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue