replace buttons with MyButton

pull/683/head
Justin Wang 1 year ago committed by AT
parent 5ca8767c81
commit 28b0455451

@ -32,28 +32,15 @@ Drawer {
Accessible.name: qsTr("Drawer on the left of the application") Accessible.name: qsTr("Drawer on the left of the application")
Accessible.description: qsTr("Drawer that is revealed by pressing the hamburger button") Accessible.description: qsTr("Drawer that is revealed by pressing the hamburger button")
Button { MyButton {
id: newChat id: newChat
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
padding: 15
font.pixelSize: theme.fontSizeLarger font.pixelSize: theme.fontSizeLarger
background: Rectangle { text: qsTr("New chat")
color: theme.backgroundDarkest Accessible.role: Accessible.Button
opacity: .5 Accessible.name: text
border.color: theme.backgroundLightest Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
border.width: 1
radius: 10
}
contentItem: Text {
text: qsTr("New chat")
horizontalAlignment: Text.AlignHCenter
color: theme.textColor
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
}
onClicked: { onClicked: {
LLM.chatListModel.addChat(); LLM.chatListModel.addChat();
Network.sendNewChat(LLM.chatListModel.count) Network.sendNewChat(LLM.chatListModel.count)
@ -263,91 +250,47 @@ Drawer {
} }
} }
Button { MyButton {
id: checkForUpdatesButton id: checkForUpdatesButton
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: downloadButton.top anchors.bottom: downloadButton.top
anchors.bottomMargin: 10 anchors.bottomMargin: 10
padding: 15 text: qsTr("Updates")
contentItem: Text { Accessible.role: Accessible.Button
text: qsTr("Updates") Accessible.name: text
horizontalAlignment: Text.AlignHCenter Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
color: theme.textColor
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
}
background: Rectangle {
opacity: .5
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
onClicked: { onClicked: {
if (!LLM.checkForUpdates()) if (!LLM.checkForUpdates())
checkForUpdatesError.open() checkForUpdatesError.open()
} }
} }
Button { MyButton {
id: downloadButton id: downloadButton
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: aboutButton.top anchors.bottom: aboutButton.top
anchors.bottomMargin: 10 anchors.bottomMargin: 10
padding: 15 text: qsTr("Downloads")
contentItem: Text { Accessible.role: Accessible.Button
text: qsTr("Downloads") Accessible.name: text
horizontalAlignment: Text.AlignHCenter Accessible.description: qsTr("Use this to launch a dialog to download new models")
color: theme.textColor
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch a dialog to download new models")
}
background: Rectangle {
opacity: .5
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
onClicked: { onClicked: {
downloadClicked() downloadClicked()
} }
} }
Button { MyButton {
id: aboutButton id: aboutButton
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
padding: 15 padding: 15
contentItem: Text { text: qsTr("About")
text: qsTr("About") Accessible.role: Accessible.Button
horizontalAlignment: Text.AlignHCenter Accessible.name: text
color: theme.textColor Accessible.description: qsTr("Use this to launch a dialog to show the about page")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch a dialog to show the about page")
}
background: Rectangle {
opacity: .5
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
onClicked: { onClicked: {
aboutClicked() aboutClicked()
} }

Loading…
Cancel
Save