mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-24 12:12:09 +00:00
Allow Package widget to be anywhere
This commit is contained in:
parent
aa08206e4b
commit
c101449ba6
4 changed files with 7 additions and 4 deletions
|
@ -104,6 +104,7 @@ highlight {
|
||||||
.package-outofdate {
|
.package-outofdate {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin-right: -5px;
|
margin-right: -5px;
|
||||||
|
margin-left: -5px;
|
||||||
color: #ff5555;
|
color: #ff5555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAmBA;EACI;EACA;;;AASJ;EACI,kBA7BC;EA8BD;;;AAGJ;EACI;EACA;;;AAGJ;EACI,WAxBO;;;AA2BX;EACI;EAEA;EAEA,OA5CO;;;AA8CX;EACI;EAGA,OAlDO;;;AAoDX;EACI;EAGA,OAxDO;;;AA2DX;EACI;EAGA,OAzDE;;;AA+DN;EACI;;;AAIJ;EACI;EACA;EACA;EACA,kBA/EO;EAgFP;EACA;EACA;;;AAGJ;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA,OArGK;EAsGL;;;AAIA;EACI,kBA/GG;;AAkHP;EACI;;AAGJ;EACI,kBAnHC;;;AAuHT;EACI;EACA,OAvHK;EAwHL;;;AAIA;EACI,kBAnIG;;AAsIP;EACI;;AAGJ;EACI,kBArIC;;;AAyIT;EACI;EACA;EACA,OA3IE;;;AA8IN;EACI,WAzIO;EA0IP,OA5IK;EA6IL;;;AAEJ;EACI;EACA,OAjJK;EAkJL;;;AAEJ;EACI;EACA,OAtJK;EAuJL;;;AAEJ;EACI;EACA,OA3JK;EA4JL;;;AAGJ;EACI,OArKK;EAsKL,kBA5KO;EA6KP,WAhKO;;;AAkKX;EACI,OA1KK;EA2KL;EACA,WArKO;;;AAwKX;EACI,OAlLK;EAmLL,kBAv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ACI,OA/WF;;;AA6XN;EACI,OA9XE;EA+XF,kBAtYO;EAuYP;EACH;EACA;;;AAED;EAaI,OAhZK;EAiZL,kBAzZO;EA0ZP;EACA;EACH;EACG;;AAjBA;EACI;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA","file":"style.css"}
|
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAmBA;EACI;EACA;;;AASJ;EACI,kBA7BC;EA8BD;;;AAGJ;EACI;EACA;;;AAGJ;EACI,WAxBO;;;AA2BX;EACI;EAEA;EAEA,OA5CO;;;AA8CX;EACI;EAGA,OAlDO;;;AAoDX;EACI;EAGA,OAxDO;;;AA2DX;EACI;EAGA,OAzDE;;;AA+DN;EACI;;;AAIJ;EACI;EACA;EACA;EACA,kBA/EO;EAgFP;EACA;EACA;;;AAGJ;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA,OArGK;EAsGL;;;AAIA;EACI,kBA/GG;;AAkHP;EACI;;AAGJ;EACI,kBAnHC;;;AAuHT;EACI;EACA,OAvHK;EAwHL;;;AAIA;EACI,kBAnIG;;AAsIP;EACI;;AAGJ;EACI,kBArIC;;;AAyIT;EACI;EACA;EACA;EACA,OA5IE;;;AA+IN;EACI,WA1IO;EA2IP,OA7IK;EA8IL;;;AAEJ;EACI;EACA,OAlJK;EAmJL;;;AAEJ;EACI;EACA,OAvJK;EAwJL;;;AAEJ;EACI;EACA,OA5JK;EA6JL;;;AAGJ;EACI,OAtKK;EAuKL,kBA7KO;EA8KP,WAjKO;;;AAmKX;EACI,OA3KK;EA4KL;EACA,WAtKO;;;AAyKX;EACI,OAnLK;EAoLL,kBAxLO;;;AA0LX;EACI,OAvLK;EAwLL;EACA,WAhLO;;;AAmLX;EACI,OAzLK;EA0LL,kBAlMO;;;AAoMX;EACI,OA7LK;EA8LL;EACA,WA1LO;;;AA6LX;EACI,OAzMG;EA0MH,kBA5MO;;;AA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ACI;EACA;EACA;EACA","file":"style.css"}
|
|
@ -148,6 +148,7 @@ highlight {
|
||||||
.package-outofdate {
|
.package-outofdate {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin-right: -5px;
|
margin-right: -5px;
|
||||||
|
margin-left: -5px;
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,12 +145,14 @@ namespace Bar
|
||||||
if (numOutdatedPackages)
|
if (numOutdatedPackages)
|
||||||
{
|
{
|
||||||
text.SetText(" ");
|
text.SetText(" ");
|
||||||
|
text.SetVisible(true);
|
||||||
text.SetClass("package-outofdate");
|
text.SetClass("package-outofdate");
|
||||||
text.SetTooltip("Updates available! (" + std::to_string(numOutdatedPackages) + " packages)");
|
text.SetTooltip("Updates available! (" + std::to_string(numOutdatedPackages) + " packages)");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text.SetText("");
|
text.SetText("");
|
||||||
|
text.SetVisible(false);
|
||||||
text.SetClass("package-empty");
|
text.SetClass("package-empty");
|
||||||
text.SetTooltip("");
|
text.SetTooltip("");
|
||||||
}
|
}
|
||||||
|
@ -414,9 +416,9 @@ namespace Bar
|
||||||
{
|
{
|
||||||
auto text = Widget::Create<Text>();
|
auto text = Widget::Create<Text>();
|
||||||
text->SetText("");
|
text->SetText("");
|
||||||
|
text->SetVisible(false);
|
||||||
text->SetClass("package-empty");
|
text->SetClass("package-empty");
|
||||||
text->AddTimer<Text>(DynCtx::UpdatePackages, 1000 * Config::Get().checkUpdateInterval,
|
text->AddTimer<Text>(DynCtx::UpdatePackages, 1000 * Config::Get().checkUpdateInterval, TimerDispatchBehaviour::ImmediateDispatch);
|
||||||
TimerDispatchBehaviour::ImmediateDispatch);
|
|
||||||
parent.AddChild(std::move(text));
|
parent.AddChild(std::move(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,7 +646,6 @@ namespace Bar
|
||||||
right->SetSpacing({8, false});
|
right->SetSpacing({8, false});
|
||||||
right->SetHorizontalTransform({-1, true, Alignment::Right});
|
right->SetHorizontalTransform({-1, true, Alignment::Right});
|
||||||
{
|
{
|
||||||
// Needs to be rightmost, since an empty package string introduces additional padding
|
|
||||||
WidgetPackages(*right);
|
WidgetPackages(*right);
|
||||||
|
|
||||||
WidgetAudio(*right);
|
WidgetAudio(*right);
|
||||||
|
|
Loading…
Reference in a new issue