From 29eb7b5eb9a0d7f79e5bc48d3ba1896adb57f4fb Mon Sep 17 00:00:00 2001 From: John Janus Date: Thu, 16 Aug 2018 00:48:38 +0200 Subject: [PATCH] use Style constants as default for NavigationButton --- cm-ui/components/NavigationBar.qml | 24 ------------------------ cm-ui/components/NavigationButton.qml | 12 ++++++------ 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/cm-ui/components/NavigationBar.qml b/cm-ui/components/NavigationBar.qml index c5fe3be..e145a91 100644 --- a/cm-ui/components/NavigationBar.qml +++ b/cm-ui/components/NavigationBar.qml @@ -18,12 +18,6 @@ Item { width: parent.width NavigationButton { - iconHeight: Style.heightNavigationButtonIcon - iconWidth: Style.widthNavigationButtonIcon - descriptionHeight: Style.heightNavigationButtonDescription - descriptionWidth: Style.widthNavigationButtonDescription - color: Style.colourNavigationBarFont - background: Style.colourNavigationBarBackground hoverColor: "#993333" iconCharacter: "\uf0c9" description: "" @@ -31,12 +25,6 @@ Item { } NavigationButton { - iconHeight: Style.heightNavigationButtonIcon - iconWidth: Style.widthNavigationButtonIcon - descriptionHeight: Style.heightNavigationButtonDescription - descriptionWidth: Style.widthNavigationButtonDescription - color: Style.colourNavigationBarFont - background: Style.colourNavigationBarBackground hoverColor: "#dc8a00" iconCharacter: "\uf015" description: "Dashboard" @@ -44,12 +32,6 @@ Item { } NavigationButton { - iconHeight: Style.heightNavigationButtonIcon - iconWidth: Style.widthNavigationButtonIcon - descriptionHeight: Style.heightNavigationButtonDescription - descriptionWidth: Style.widthNavigationButtonDescription - color: Style.colourNavigationBarFont - background: Style.colourNavigationBarBackground hoverColor: "#dccd00" iconCharacter: "\uf234" description:"New Client" @@ -57,12 +39,6 @@ Item { } NavigationButton { - iconHeight: Style.heightNavigationButtonIcon - iconWidth: Style.widthNavigationButtonIcon - descriptionHeight: Style.heightNavigationButtonDescription - descriptionWidth: Style.widthNavigationButtonDescription - color: Style.colourNavigationBarFont - background: Style.colourNavigationBarBackground hoverColor: "#8aef63" iconCharacter: "\uf002" description: "Find Client" diff --git a/cm-ui/components/NavigationButton.qml b/cm-ui/components/NavigationButton.qml index e660a00..0f6c1c2 100644 --- a/cm-ui/components/NavigationButton.qml +++ b/cm-ui/components/NavigationButton.qml @@ -8,13 +8,13 @@ Item { id: top property alias iconCharacter: textIcon.text property alias description: textDescription.text - property color color: "#ff0000" - property color background: "#00ff00" + property color color: Style.colourNavigationBarFont + property color background: Style.colourNavigationBarBackground property color hoverColor: "#0000ff" - property real iconWidth: 0 - property real descriptionWidth: 0 - property real iconHeight: 0 - property real descriptionHeight: 0 + property real iconWidth: Style.widthNavigationButtonIcon + property real descriptionWidth: Style.widthNavigationButtonDescription + property real iconHeight: Style.heightNavigationButtonIcon + property real descriptionHeight: Style.heightNavigationButtonDescription height: Math.max(iconHeight, descriptionHeight) width: parent.width -- 2.47.0