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

Add OpacityMask to fix mouse hover on round corner. #2235

Merged
merged 1 commit into from Jul 28, 2020
Merged

Conversation

camilasan
Copy link
Member

@camilasan camilasan commented Jul 27, 2020

Signed-off-by: Camila hello@camila.codes

@camilasan camilasan added this to the 2.7 🌟 UI improvements milestone Jul 27, 2020
@camilasan camilasan changed the title Fix #2173: add OpacityMask to trayWindowBackground. Add OpacityMask to fix mouse hover on round corner. Jul 27, 2020
visible: accountBtnMouseArea.containsMouse
}
background: Rectangle {
color: currentAccountButton.hovered ? "white" : "transparent"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect the hover effect to be broken. So I think that either you want to add hoverEnabled: Style.hoverEffectsEnabled in currentAccountButton or you need to use accountBtnMouseArea.containsMouse.

Copy link
Member Author

@camilasan camilasan Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting the same but it is working:
hover

Should I change yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting the same but it is working:
hover

Should I change yet?

Odd, was failing for me. I wonder if it's a platform thing with hoverEnabled default being different on the Button...

Alright, after a quick check in QtQuick2 and QtQuickControls2 code... hoverEnabled is indeed following QGuiApplication::styleHints()->useHoverEffects() by default.

@er-vin
Copy link
Member

er-vin commented Jul 28, 2020

/rebase

- Fix for #2173.
- Removed the workaround for the left round corner which was also
fixed with the OpacityMask.

Signed-off-by: Camila <hello@camila.codes>
@nextcloud-desktop-bot
Copy link

AppImage file: Nextcloud-PR-2235-f630a2b8c2c3cba944d6f849933e767dda73d4e2-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@er-vin er-vin merged commit e89177b into master Jul 28, 2020
@er-vin er-vin deleted the fix-issue-2173 branch July 28, 2020 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tray menu right angle corner overlaps when pushed
3 participants