mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-23 19:52:09 +00:00
Properly center the time
If the time widget is in the center, it wasn't properly centered. For that to happen, center alignment and expand must be set.
This commit is contained in:
parent
c5f2dd80c7
commit
3a7fd719a2
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ namespace Bar
|
|||
{
|
||||
case Left: return Alignment::Left;
|
||||
case Right: return Alignment::Right;
|
||||
case Center: return Alignment::Fill;
|
||||
case Center: return Alignment::Center;
|
||||
}
|
||||
return Alignment::Right;
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ namespace Bar
|
|||
void WidgetTime(Widget& parent, Side side)
|
||||
{
|
||||
auto time = Widget::Create<Text>();
|
||||
Utils::SetTransform(*time, {-1, false, SideToAlignment(side)});
|
||||
Utils::SetTransform(*time, {-1, side == Side::Center, SideToAlignment(side)});
|
||||
time->SetAngle(Utils::GetAngle());
|
||||
time->SetClass("widget");
|
||||
time->AddClass("time-text");
|
||||
|
|
Loading…
Reference in a new issue