Made Sidebar standalone - #3
Open
albert-tomanek wants to merge 10 commits into
Open
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ok, I've made the sidebar into a self-contained widget. It's now called
Aero::Sidebarbut I've left it in the source of the contorl panel for now so that it's still easy to add more features later if needed. Instead of adding SidebarLinks, I've written it so that you pass items to it as QActions. Where each action opens the associated page when triggered.QActions can also contain an icon for the action, and the sidebar displays it if you turn that on:
Also if you set the
elevatedPrivproperty on a QAction then it displays the shield like in Windows.see here for code
I think it would be worth considering making the whole app use QActions to store links. Where each action would just have a different callback attached to ::trigger() depending on whether it was a command action or a page action. And you could then have eg. this widget read the and display the
iconandelevatedPrivfields from each inserted action in the same way that the Sidebar does.Also you need to have the latest libAeroQt installed and set the system application style to
libAeroQt-Kvantum(which it now installs) for the sidebar background to draw properly, because I've moved the background drawing code into the Qt theme.