diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2018-03-22 07:43:24 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2018-03-23 03:57:27 +0000 |
commit | a655a94f28bb6e4e19486eba8d50db3cc5b823b8 (patch) | |
tree | 55bd7e72f6d45ebe65dbc57d611b0024a6b6f199 /src/Authoring/Studio/Palettes/controls | |
parent | 90e4f80a8492a50c147aebdfe4ea295860cf7c09 (diff) |
Fix tooltips view menu item
Task-number: QT3DS-1320
Change-Id: If50eb65bcae06eecc52fd9b4ca20fb28016c9a5a
Reviewed-by: Janne Kangas <janne.kangas@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/controls')
-rw-r--r-- | src/Authoring/Studio/Palettes/controls/StyledToolButton.qml | 2 | ||||
-rw-r--r-- | src/Authoring/Studio/Palettes/controls/StyledTooltip.qml | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/controls/StyledToolButton.qml b/src/Authoring/Studio/Palettes/controls/StyledToolButton.qml index 6399f68b..bae3bfdb 100644 --- a/src/Authoring/Studio/Palettes/controls/StyledToolButton.qml +++ b/src/Authoring/Studio/Palettes/controls/StyledToolButton.qml @@ -41,7 +41,7 @@ ToolButton { StyledTooltip { id: toolTip - visible: control.hovered + enabled: control.hovered } background: Rectangle { diff --git a/src/Authoring/Studio/Palettes/controls/StyledTooltip.qml b/src/Authoring/Studio/Palettes/controls/StyledTooltip.qml index cae9c59f..cc0be2cf 100644 --- a/src/Authoring/Studio/Palettes/controls/StyledTooltip.qml +++ b/src/Authoring/Studio/Palettes/controls/StyledTooltip.qml @@ -36,6 +36,17 @@ ToolTip { text: control.text } + // Handle tooltip visibility based on the trigger event given to the 'enabled' property and + // the 'Tooltips' view menu setting. Has to be done this way, as even though the eventFilter + // set for MainFrm catches the tooltip events for QML, it doesn't prevent showing them because + // we were/are controlling the visibility in code. + onEnabledChanged: { + if (enabled && _parentView.toolTipsEnabled()) + visible = true; + else + visible = false; + } + background: Rectangle { border.color: _studioColor3 color: _studioColor2 |