-
Notifications
You must be signed in to change notification settings - Fork 1
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
Status bar refactoring #66
Conversation
I've made the statusbar more object based, more capable. Every status bar icon (image or text) now have object representation that can be used to manipulate icon status (visible, hidden, warning), color (setcolor) and text (in case of text status).
This commit is good for studying how to add new status bar icon and update it's state.
src/ui/statusbar.h
Outdated
{ | ||
if (status_ != status) | ||
{ | ||
auto call_update = (status == StatusBarIconStatus::Hidden || status_ == StatusBarIconStatus::Hidden); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first time I've seen this: using auto
instead of bool
for a boolean variable. Is that something new - using auto
as much as possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, C# makes my coding style too lazy. Will change it to bool as it's really not required to use auto in here. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fixed
Wow! What a lot of work for just the icons!!! But I'm glad you did it - it will make it much easier to do anything with icons in the future. I didn't review every line - it was too much for my brain. And I had only one question - about style, not substance. I'm sure you've tested it, and we'll find out soon enough if it's not working correctly. |
I've made the statusbar more object based, more capable. Every status bar icon (image or text) now have object representation that can be used to manipulate icon status (visible, hidden, warning), color (setcolor) and text (in case of text status).
Last commit contains adding new status icon - number of pending messages from SK server or warning messages about SK connection or Wifi.