Comments (18)
I've merged this feature and titlebar alignment to the master
branch.
screen-2021-02-09_17.33.06.mp4
from material-decoration.
The menuonhover
branch has this feature. I now need to add a config option.
I need to figure out how I want to handle the caption. It currently "dodges" the menu which isn't needed when the menu is hidden.
I should probably do a comprehensive alignment option like Breeze.
- Left/Center/Right
- Center [between left/right buttons]
- Center (Full Width) [true center of window]
- Center (Full Width + Dodge Menu) [current MaterialDecoration behavior]
from material-decoration.
Hmm. According to the Unity video https://youtu.be/nzFXRz-b3Ns?t=40
- Captions are left aligned
- Menu doesn't appear when hovered until the window is focused
- The title completely disappears, theres' no gradient (at least not in Ubuntu 14.04).
from material-decoration.
hey adding to this, could we have the title of the window instead of empty space?
so on no hover -> title
on hover -> menu
I implement this feature you want. you can compile and test it.
https://github.com/mojtaba82/material-decoration
from material-decoration.
Thanks for reporting the bug @nicman23. I fixed that bug and made the titlebar repaint when toggling always show.
from material-decoration.
To reproduce it, you need to click at points sit at the lower-half part of buttons...
I cinfirm this.
from material-decoration.
I already have background opacity animations, so making a reveal on hover animation isn't too difficult. The hard part is having the entire menu drawn in sync as the current bg hover animation is per button. I will need another QAnimation
, probably in AppMenuButtonGroup
. I'll also need to rename the existing opacity
property to backgroundOpacity
, or hoverTween
as the foreground color was also mixed on hover.
This code snippet will make all buttons transparent, and reveal just 1 button on hover.
QColor AppMenuButton::foregroundColor() const
{
// ...
} else {
QColor hoverColor = Button::foregroundColor();
QColor normalColor = QColor(hoverColor);
normalColor.setAlphaF(0);
return KColorUtils::mix(
normalColor,
hoverColor,
opacity());
}
}
I also need to determine if the menu should be revealed if the caption area is hovered, or if anywhere in the titlebar is hovered. If the latter, then the hover events need to be handled in Decoration
. I can still keep the new opacity property in AppMenuButtonGroup
though.
from material-decoration.
can we have this without any animation?
from material-decoration.
I'm also interested on this, even without animations
from material-decoration.
I fork this nice decoration. and add a branch named captionmenufeatcher and merge caption and menu like unity lim.
It work but I'm not professional in programming. I would be glad if you test it.
Thanks
from material-decoration.
hey adding to this, could we have the title of the window instead of empty space?
so on no hover -> title
on hover -> menu
from material-decoration.
- Caption will now hide on hover, and it's position ignores the space taken up by the menu.
- There's now a toggle in the config.
- I used a hack to treat the "checkbox" as 2 radio buttons so that the on/off state has descriptive labels.
- I need to bind the config toggle to redraw the menu.
from material-decoration.
small bug report, the menu is visible on window creation not the title
from material-decoration.
Is this a related bug?
vokoscreenNG-2021-02-18_23-15-49.mp4
from material-decoration.
I have same problem occasionally.
from material-decoration.
The hover animation isn't checking if the menu is open atm. I did experience that once, but it rarely happens with Breeze's contextmenu.
Looks like I need to check (m_currentIndex != -1)
in the updateOpacity
func.
setOpacity(m_alwaysShow || m_hovered ? 1 : 0);
from material-decoration.
To reproduce it, you need to click at points sit at the lower-half part of buttons...
from material-decoration.
Should be fixed with d026781 and 8873774.
Thanks @trmdi for your PR #34. I expanded on it to add a bool showing
property which represents the alwaysShow || hovered || isMenuOpen()
.
from material-decoration.
Related Issues (20)
- .
- Eclipse, DBeaver and Sublime applications do not appear in the menu in the title bar. HOT 1
- The distance between menu options is short. HOT 2
- Doesn't compile on kUbuntu 20.04 (since commit #3f724dcf436233d24abe9f2dfc450ba5d0ac00dd) HOT 5
- does not work in wayland HOT 3
- registerPlugin error when compiling HOT 1
- Qt6 Removes X11Info from Qt5::X11Extras HOT 8
- How to install in Fedora? HOT 1
- Дополнить readme HOT 1
- Appmenu doesn't appear for windows spawned from tray icons. HOT 8
- Blur breaks with plasma 5.25 HOT 7
- Libreoffice does't show menu HOT 2
- Build failed on Tumbleweed HOT 3
- Support KWin's tablet mode to increase decoration button size using touch
- Determine if I should use OutCubic for Button opacity animation HOT 1
- does not work on lxqt with kwin HOT 2
- Bug: Space at side of global menu prevents easy use in corner HOT 1
- Overlay decoration for windows that don't export the menubar
- Allow hiding titlebar for specific windows, like Breeze.
- Plasma 6 compatibility HOT 39
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-decoration.