-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented window header color change when focused (on top). (#3515)
This PR replaces an old one with many problems (no collapse icon, the header background was not funny colored, ugly...). It fixes those problems. It implements the highlight of the header to the focused window. And allows the rest of the application to know the selected window. It allows, for instance, to display multiple windows with images and some additional meta information about those images on the side panel of the main window. The side panel updates itself according to the selected image window. * Added a theme color for the selected window header. * Added a function to retrieve the LayerId of the focused window. * Implemented a simple demo of this function in the demo app where a message states if the Option window is focused (at the bottom of the Options window).  A technical point: The header color is applied with a transparency of 125 so the collapsible button becomes visible. The reason is that the collapsible button is rendered before the rest of the header and before the header size is known. We cannot draw the background before knowing this value, so rendering with transparency is a solution to see the collapsible button through the header background. This PR has been sponsored by my company, which left me to do it during my work time. This is part of an evil plan to convince them to switch to rust for new projects :) --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
- Loading branch information
1 parent
4a6999b
commit 1777bb7
Showing
4 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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