mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
bfa5c93d40
commit
294606d019
@ -63,7 +63,7 @@ FluContentPage{
|
||||
age:getRandomAge(),
|
||||
address: getRandomAddresses(),
|
||||
nickname: getRandomNickname(),
|
||||
longstring:"测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试",
|
||||
longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好",
|
||||
height:46,
|
||||
minimumHeight:46,
|
||||
maximumHeight:300,
|
||||
|
@ -44,8 +44,8 @@ ComboBox {
|
||||
topPadding: 6 - control.padding
|
||||
bottomPadding: 6 - control.padding
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTheme.primaryColor.lightest
|
||||
selectedTextColor: control.palette.highlightedText
|
||||
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
selectedTextColor: color
|
||||
text: control.editable ? control.editText : control.displayText
|
||||
enabled: control.editable
|
||||
autoScroll: control.editable
|
||||
|
@ -15,9 +15,9 @@ TextEdit {
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
selectByMouse: true
|
||||
selectedTextColor: FluColors.Grey220
|
||||
selectedTextColor: color
|
||||
bottomPadding: 0
|
||||
selectionColor: FluTheme.primaryColor.lightest
|
||||
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
font:FluTextStyle.Body
|
||||
onSelectedTextChanged: {
|
||||
control.forceActiveFocus()
|
||||
|
@ -23,7 +23,8 @@ TextArea{
|
||||
font:FluTextStyle.Body
|
||||
wrapMode: Text.WrapAnywhere
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTheme.primaryColor.lightest
|
||||
selectedTextColor: color
|
||||
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
return placeholderDisableColor
|
||||
|
@ -24,7 +24,8 @@ TextField{
|
||||
font:FluTextStyle.Body
|
||||
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTheme.primaryColor.lightest
|
||||
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
return placeholderDisableColor
|
||||
|
@ -8,6 +8,7 @@ import FluentUI
|
||||
Rectangle {
|
||||
property var columnSource
|
||||
property var dataSource
|
||||
property color selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
onColumnSourceChanged: {
|
||||
@ -185,17 +186,28 @@ Rectangle {
|
||||
id:item_table
|
||||
property var position: Qt.point(column,row)
|
||||
required property bool selected
|
||||
color: selected ? FluTheme.primaryColor.lightest: (row%2!==0) ? control.color : (FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06))
|
||||
color: (row%2!==0) ? control.color : (FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06))
|
||||
implicitHeight: 40
|
||||
implicitWidth: columnSource[column].width
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
visible: item_loader.sourceComponent === null
|
||||
color: selected ? control.selectionColor : "#00000000"
|
||||
}
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onDoubleClicked: {
|
||||
onPressed:{
|
||||
closeEditor()
|
||||
table_view.interactive = false
|
||||
}
|
||||
onReleased: {
|
||||
table_view.interactive = true
|
||||
}
|
||||
onDoubleClicked:{
|
||||
if(display instanceof Component){
|
||||
return
|
||||
}
|
||||
selection_model.clear()
|
||||
item_loader.sourceComponent = d.obtEditDelegate(column,row)
|
||||
}
|
||||
onClicked:
|
||||
@ -205,6 +217,7 @@ Rectangle {
|
||||
selection_model.clear()
|
||||
}
|
||||
selection_model.select(table_model.index(row,column),ItemSelectionModel.Select)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
Loader{
|
||||
@ -231,6 +244,7 @@ Rectangle {
|
||||
property int column
|
||||
property int row
|
||||
property var tableView: control
|
||||
sourceComponent: null
|
||||
onDisplayChanged: {
|
||||
var obj = table_model.getRow(row)
|
||||
obj[columnSource[column].dataIndex] = display
|
||||
@ -252,6 +266,11 @@ Rectangle {
|
||||
}
|
||||
bottomRightHandle:com_handle
|
||||
topLeftHandle: com_handle
|
||||
onDraggingChanged: {
|
||||
if(dragging === false){
|
||||
table_view.interactive = true
|
||||
}
|
||||
}
|
||||
}
|
||||
TableView {
|
||||
id: header_horizontal
|
||||
@ -272,7 +291,7 @@ Rectangle {
|
||||
readonly property var obj : columnSource[column]
|
||||
implicitWidth: column_text.implicitWidth + (cellPadding * 2)
|
||||
implicitHeight: Math.max(header_horizontal.height, column_text.implicitHeight + (cellPadding * 2))
|
||||
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
color: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
border.color: FluTheme.dark ? "#252525" : "#e4e4e4"
|
||||
FluText {
|
||||
id: column_text
|
||||
@ -354,6 +373,7 @@ Rectangle {
|
||||
id:row_text
|
||||
anchors.centerIn: parent
|
||||
text: row + 1
|
||||
font.bold: true
|
||||
}
|
||||
TapHandler{
|
||||
onDoubleTapped: {
|
||||
|
@ -23,7 +23,8 @@ TextField{
|
||||
}
|
||||
font:FluTextStyle.Body
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTheme.primaryColor.lightest
|
||||
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
return placeholderDisableColor
|
||||
|
Loading…
Reference in New Issue
Block a user