mirror of
https://github.com/QuasarApp/ViewSolutions.git
synced 2025-05-03 13:09:42 +00:00
update guiTokens
This commit is contained in:
parent
6cc67b4a4e
commit
ed1fd106e6
@ -9,13 +9,14 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Pane {
|
||||
Page {
|
||||
id: root
|
||||
|
||||
// use Comonent delegates only
|
||||
property alias initialItem: stackView.initialItem
|
||||
property alias currentItem: stackView.currentItem
|
||||
property alias titlesAligh: headerView.titlesAligh
|
||||
property int titlesAligh: Text.AlignLeft
|
||||
|
||||
property alias depth: stackView.depth
|
||||
property bool cache: true
|
||||
property bool enableHeader: true
|
||||
@ -25,12 +26,6 @@ Pane {
|
||||
|
||||
background: Item{}
|
||||
|
||||
contentItem: Page {
|
||||
id: contentPage
|
||||
|
||||
padding: 0
|
||||
background: Item{}
|
||||
|
||||
header: ActivityProcessorHeader {
|
||||
id: headerView
|
||||
visible: root.enableHeader
|
||||
@ -45,7 +40,7 @@ Pane {
|
||||
backButton: root.enableHeader && stackView.depth > 1 && (stackView.currentItem && stackView.currentItem.buttonBack)
|
||||
|
||||
closeButton: root.enableHeader && (stackView.currentItem && stackView.currentItem.closeButton)
|
||||
titlesAligh: Text.AlignLeft
|
||||
titlesAligh: root.titlesAligh
|
||||
onBackClicked: {
|
||||
root.popItem()
|
||||
}
|
||||
@ -141,7 +136,7 @@ Pane {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create new activity from component with model activityModel, after drop this activity will be called callback function
|
||||
// Note The callback function works only with ActivityPage childs.
|
||||
|
@ -15,7 +15,11 @@ QString iGUITokensModel::modelId() const {
|
||||
return "GUITokens";
|
||||
}
|
||||
|
||||
QColor &iGUITokensModel::addTransporent(QColor &input, float alpha) const {
|
||||
QColor iGUITokensModel::addTransporent(QColor input, float alpha) const {
|
||||
return addTransporentImpl(input, alpha);
|
||||
}
|
||||
|
||||
QColor &iGUITokensModel::addTransporentImpl(QColor &input, float alpha) const {
|
||||
input.setAlphaF(alpha);
|
||||
return input;
|
||||
}
|
||||
|
@ -34,10 +34,13 @@ class VIEWSOLUTION_EXPORT iGUITokensModel: public QObject, public iModel
|
||||
Q_PROPERTY(QColor color_text_tertiary READ color_text_tertiary CONSTANT FINAL)
|
||||
|
||||
Q_PROPERTY(QColor color_text_disabled READ color_text_disabled CONSTANT FINAL)
|
||||
|
||||
Q_PROPERTY(QColor color_border_primary READ color_border_primary CONSTANT FINAL)
|
||||
Q_PROPERTY(QColor color_border_secondary READ color_border_secondary CONSTANT FINAL)
|
||||
Q_PROPERTY(QColor color_border_disabled READ color_border_disabled CONSTANT FINAL)
|
||||
|
||||
Q_PROPERTY(QColor color_devider READ color_devider CONSTANT FINAL)
|
||||
Q_PROPERTY(QColor color_background READ color_background CONSTANT FINAL)
|
||||
|
||||
//states_colors_constants:
|
||||
Q_PROPERTY(QColor pressed_focused READ pressed_focused CONSTANT FINAL)
|
||||
@ -89,6 +92,7 @@ public:
|
||||
virtual QColor color_border_secondary() const = 0;
|
||||
virtual QColor color_border_disabled() const = 0;
|
||||
virtual QColor color_devider() const = 0;
|
||||
virtual QColor color_background() const = 0;
|
||||
|
||||
virtual QColor pressed_focused() const = 0;
|
||||
virtual QColor hover() const = 0;
|
||||
@ -125,6 +129,9 @@ public:
|
||||
public:
|
||||
QString modelId() const;
|
||||
|
||||
Q_INVOKABLE QColor addTransporent(QColor input, float alpha) const;
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief addTransporent This method add alpha chennel to the color.
|
||||
@ -132,7 +139,7 @@ protected:
|
||||
* @param alpha alphachennol factor from 0 to 1.
|
||||
* @return color with new alpha chennel.
|
||||
*/
|
||||
QColor& addTransporent(QColor& input, float alpha) const;
|
||||
QColor& addTransporentImpl(QColor& input, float alpha) const;
|
||||
};
|
||||
}
|
||||
#endif // IGUITOKENSMODEL_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user