mirror of
https://github.com/QuasarApp/ViewSolutions.git
synced 2025-04-26 09:44:39 +00:00
clear deprecated functions
This commit is contained in:
parent
00a440754c
commit
7e9c085052
@ -11,10 +11,8 @@ import QtQuick.Controls
|
||||
|
||||
Control {
|
||||
property string title: ""
|
||||
property string subTitle: ""
|
||||
|
||||
// shows the back button with text
|
||||
property bool isFullBackButton: false
|
||||
property bool buttonBack: true
|
||||
|
||||
// shows close button on the ActivityProcessor header
|
||||
@ -38,5 +36,4 @@ Control {
|
||||
property var activityCallBack: () => {}
|
||||
property bool saveChangesInUnsaved: false
|
||||
|
||||
topPadding: 24
|
||||
}
|
||||
|
@ -41,26 +41,14 @@ Pane {
|
||||
return ""
|
||||
}
|
||||
|
||||
subTitle: {
|
||||
if (root.enableHeader && stackView.currentItem && stackView.currentItem.subTitle) {
|
||||
return stackView.currentItem.subTitle
|
||||
}
|
||||
return ""
|
||||
|
||||
}
|
||||
backButton: root.enableHeader && stackView.depth > 1 && (stackView.currentItem && stackView.currentItem.buttonBack)
|
||||
fullBackButton: root.enableHeader && (stackView.currentItem && stackView.currentItem.isFullBackButton)
|
||||
|
||||
closeButton: root.enableHeader && (stackView.currentItem && stackView.currentItem.closeButton)
|
||||
closeButtonBorder: root.enableHeader && (stackView.currentItem && stackView.currentItem.closeButtonBorder)
|
||||
titlesAligh: Text.AlignLeft
|
||||
onBackClicked: {
|
||||
popItem()
|
||||
root.popItem()
|
||||
}
|
||||
|
||||
onCloseClicked: {
|
||||
popupProcessor.close()
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: StackView {
|
||||
@ -68,7 +56,7 @@ Pane {
|
||||
target: (stackView.currentItem && stackView.currentItem.finish)? stackView.currentItem : null
|
||||
|
||||
function onFinish() {
|
||||
popItem();
|
||||
root.popItem()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,98 +9,43 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout {
|
||||
RowLayout {
|
||||
|
||||
id: root
|
||||
property int titlesAligh: Text.AlignHCenter
|
||||
|
||||
property font titlesFont: tokensModel.font_title_uppercase
|
||||
property alias rightSubtitleWidget: rightSubtitleControl.contentItem
|
||||
|
||||
property bool closeButtonBorder: true
|
||||
property string title: ""
|
||||
property bool titleUppercase: true
|
||||
property string subTitle: ""
|
||||
property bool backButton: false
|
||||
property bool fullBackButton: false
|
||||
property bool closeButton: false
|
||||
property int headerRowHeight: 40
|
||||
|
||||
signal backClicked()
|
||||
signal closeClicked()
|
||||
|
||||
columns: 3
|
||||
ToolButton {
|
||||
|
||||
Item {
|
||||
implicitWidth: headerRowHeight
|
||||
visible: !backButton && titlesAligh === Text.AlignHCenter
|
||||
}
|
||||
|
||||
Button {
|
||||
|
||||
// Layout.alignment: Qt.AlignLeft
|
||||
visible: backButton
|
||||
icon: (root.fullBackButton)? "qrc:/assets/icons/arrowleft_tac.svg"
|
||||
:"qrc:/assets/icons/arrowleft.svg"
|
||||
fontColor: tokensModel.color_text_secondary
|
||||
backgroundBorderColor: tokensModel.color_border_secondary
|
||||
isFlat: !root.fullBackButton
|
||||
text: root.fullBackButton? qsTr("Go Back"): ""
|
||||
Layout.preferredHeight: 24
|
||||
Layout.preferredWidth: (root.fullBackButton)? implicitWidth: 24
|
||||
leftPadding: (root.fullBackButton)? 16 : padding
|
||||
rightPadding: (root.fullBackButton)? 16 :padding
|
||||
baseHeaght: 16
|
||||
padding: 4
|
||||
customFocusPolicy: Qt.NoFocus
|
||||
visible: root.backButton
|
||||
text: "<<"
|
||||
|
||||
onClicked: {
|
||||
backClicked()
|
||||
root.backClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: centralTitle
|
||||
text: (titleUppercase)? root.title.toUpperCase(): root.title
|
||||
text: (root.titleUppercase)? root.title.toUpperCase(): root.title
|
||||
horizontalAlignment: root.titlesAligh
|
||||
font: titlesFont
|
||||
Layout.fillWidth: true;
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
icon: "qrc:/assets/icons/dismiss.svg"
|
||||
onClicked: closeClicked()
|
||||
text: "x"
|
||||
onClicked: root.closeClicked()
|
||||
visible: root.closeButton
|
||||
isFlat: !closeButtonBorder
|
||||
|
||||
padding: 10
|
||||
baseHeaght: 20
|
||||
bordersSize: 2
|
||||
customFocusPolicy: Qt.NoFocus
|
||||
implicitHeight: headerRowHeight
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.row: 1
|
||||
Layout.column: (backButton || titlesAligh === Text.AlignHCenter)? 1 : 0
|
||||
|
||||
Layout.minimumHeight: 16
|
||||
visible: root.subTitle.length
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideNone
|
||||
Layout.fillWidth: true;
|
||||
text: root.subTitle
|
||||
color: tokensModel.color_text_tertiary
|
||||
font: tokensModel.font_subtitle_2
|
||||
horizontalAlignment: centralTitle.horizontalAlignment
|
||||
}
|
||||
|
||||
Control {
|
||||
id: rightSubtitleControl
|
||||
Layout.row: 1
|
||||
Layout.column: 2
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user