Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of the top bar #951

Merged
merged 26 commits into from
Mar 27, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5b46499
Move the sidebar to the top of the window
lmoureaux Mar 19, 2022
102b3fc
Rename sidebar -> top_bar
lmoureaux Mar 19, 2022
8b84fe8
Switch the top bar layout to horizontal mode
lmoureaux Mar 19, 2022
3e578d7
Remove unused heightForWidth from the top_bar
lmoureaux Mar 19, 2022
ed2b5d2
Rudimentary top bar implementation with QToolButton
lmoureaux Mar 19, 2022
fcf68b7
Replace custom "enabled" flag with the QWidget property
lmoureaux Mar 19, 2022
8bbc0bf
Top bar: Use QToolButton's icon functionality
lmoureaux Mar 19, 2022
66d5030
Set the top_bar_widget size policy internally
lmoureaux Mar 19, 2022
16ae104
Remove the empty space in the top bar
lmoureaux Mar 19, 2022
da19d19
Remove custom text processing in top_bar_widget
lmoureaux Mar 20, 2022
167257f
Remove "hover" flag in top bar widgets
lmoureaux Mar 20, 2022
e8e8b53
Remove custom painting of the top bar background
lmoureaux Mar 20, 2022
aa5fe96
Make the blink effect work with QToolButton
lmoureaux Mar 20, 2022
38fdd34
Remove bool parameter to top bar "clicked" callbacks
lmoureaux Mar 20, 2022
bbcc7f8
Restore an indication of which tab is selected
lmoureaux Mar 20, 2022
71e3038
Don't set all top bar buttons to checkable
lmoureaux Mar 20, 2022
d583b59
Restore the display of the current tax rates
lmoureaux Mar 20, 2022
639ec66
Restore the display of the "indicators"
lmoureaux Mar 20, 2022
60a35e4
Drop now-unused top_bar_widget::standard
lmoureaux Mar 20, 2022
9d4533b
clang-format
lmoureaux Mar 20, 2022
84b6b7b
Fix top bar styling with the Web theme
lmoureaux Mar 26, 2022
488fffd
Draw the background of top_bar
lmoureaux Mar 26, 2022
edd52fc
Fix chat and messages background with the system theme
lmoureaux Mar 26, 2022
ab0d4b0
Fix the Classic theme
lmoureaux Mar 26, 2022
c71826a
Fix top bar styling for Nightstalker
lmoureaux Mar 26, 2022
b231a2e
Fix top bar styling in Necrophos and TheLastLaserMaster
lmoureaux Mar 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove the empty space in the top bar
We'll rethink the layout later; for now, simplify it.

See #940.
  • Loading branch information
lmoureaux committed Mar 25, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 16ae104dae3a68ffcf5875e0cbbd85262c418525
1 change: 0 additions & 1 deletion client/gui-qt/page_game.cpp
Original file line number Diff line number Diff line change
@@ -113,7 +113,6 @@ pageGame::pageGame(QWidget *parent)
top_bar_wdg->addWidget(sw_diplo);
top_bar_wdg->addWidget(sw_science);
top_bar_wdg->addWidget(sw_economy);
top_bar_wdg->addSpacer();
top_bar_wdg->addWidget(sw_tax);
top_bar_wdg->addWidget(sw_indicators);
top_bar_wdg->addWidget(sw_endturn);
5 changes: 0 additions & 5 deletions client/gui-qt/top_bar.cpp
Original file line number Diff line number Diff line change
@@ -376,11 +376,6 @@ void top_bar::addWidget(top_bar_widget *fsw)
layout->addWidget(fsw);
}

/**
* Adds new spacer
*/
void top_bar::addSpacer() { layout->addStretch(); }

/**
Paint event for top_bar
*/
1 change: 0 additions & 1 deletion client/gui-qt/top_bar.h
Original file line number Diff line number Diff line change
@@ -92,7 +92,6 @@ class top_bar : public QWidget {
top_bar();
~top_bar() override;
void addWidget(top_bar_widget *fsw);
void addSpacer();
void paint(QPainter *painter, QPaintEvent *event);
QList<top_bar_widget *> objects;