mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-19 20:22:56 +08:00
update Button rect
This commit is contained in:
parent
47ec10e1e5
commit
d2cb10b535
@ -2,6 +2,7 @@ import QtQuick 2.9
|
|||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import TaoQuick 1.0
|
import TaoQuick 1.0
|
||||||
import "../Biz"
|
import "../Biz"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: leftPaneItem
|
id: leftPaneItem
|
||||||
signal loadContent(string path)
|
signal loadContent(string path)
|
||||||
@ -97,10 +98,12 @@ Item {
|
|||||||
color: ListView.isCurrentItem ? CusConfig.controlBorderColor_pressed : "transparent"
|
color: ListView.isCurrentItem ? CusConfig.controlBorderColor_pressed : "transparent"
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
CusTextButton {
|
CusTextButton {
|
||||||
|
id: btn
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
|
width: parent.width
|
||||||
text: qsTr(model.name) + trans.transString
|
text: qsTr(model.name) + trans.transString
|
||||||
backgroundColor: "transparent"
|
backgroundColor: "transparent"
|
||||||
borderColor: "transparent"
|
borderColor: "transparent"
|
||||||
@ -108,6 +111,16 @@ Item {
|
|||||||
listView.currentIndex = index
|
listView.currentIndex = index
|
||||||
loadContent(model.source)
|
loadContent(model.source)
|
||||||
}
|
}
|
||||||
|
contentItem: Item {
|
||||||
|
width: btn.width
|
||||||
|
height: btn.height
|
||||||
|
BasicText {
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
text: btn.text
|
||||||
|
color: btn.textColor
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user