diff options
author | Knud Dollereder <knud.dollereder@qt.io> | 2020-03-16 14:02:15 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-03-18 15:33:19 +0000 |
commit | 3e86ed81d9ab4be08abae231d2ba16489a335310 (patch) | |
tree | 0791ca6e55ef46cfeced1dffef6b380d5e14cd74 /src/plugins/qmldesigner/components/timelineeditor | |
parent | c3420c7fc366999eaee864b3ef95027c1d87f771 (diff) |
Improve visual feedback of selections
- The handles can now take 4 kinds of colors:
1) Unselected.
2) Handles influenced by a selected keyframe take the selection-color.
3) Handles that are about to be moved (the mouse hovers over it) take
the hover color.
4) Handles that are about to be indirectly moved (Handles that are influenced by the hover handles)
take the activate color
- Apply some colors of the Theme to the curve-editor.
- Fixed a drag handle bug. (The bounding box for the handle was wrong)
Change-Id: Ib474c714aae8bf88a5fb916cbef62deb29bc483e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/timelineeditor')
-rw-r--r-- | src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp index e09d09532d..d37be1cd35 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp @@ -31,6 +31,7 @@ #include <bindingproperty.h> #include <variantproperty.h> +#include <theme.h> namespace QmlDesigner { @@ -64,8 +65,8 @@ DesignTools::CurveEditorStyle AnimationCurveEditorModel::style() const out.timeAxisHeight = 60; out.timeOffsetLeft = 10; out.timeOffsetRight = 10; - out.rangeBarColor = QColor(50, 50, 255); - out.rangeBarCapsColor = QColor(50, 50, 255); + out.rangeBarColor = Theme::instance()->qmlDesignerBackgroundColorDarkAlternate(); + out.rangeBarCapsColor = Theme::getColor(Theme::QmlDesigner_HighlightColor); out.valueAxisWidth = 60; out.valueOffsetTop = 10; out.valueOffsetBottom = 10; |