Compare commits
No commits in common. "72cf0311c09994aab2945b5c70f46af2cf0734e0" and "d01f9019c0b727e371e70a679b51a7a149bcc67d" have entirely different histories.
72cf0311c0
...
d01f9019c0
|
@ -32,30 +32,6 @@ FluScrollablePage{
|
|||
}
|
||||
}
|
||||
|
||||
FluArea {
|
||||
Layout.fillWidth: true
|
||||
height: 80
|
||||
paddings: 5
|
||||
Layout.topMargin: 20
|
||||
Column{
|
||||
spacing: 5
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
FluText{
|
||||
text: "disabled=true"
|
||||
x:10
|
||||
}
|
||||
FluComboBox {
|
||||
disabled: true
|
||||
model: ListModel {
|
||||
id: model_2
|
||||
ListElement { text: "Banana" }
|
||||
ListElement { text: "Apple" }
|
||||
ListElement { text: "Coconut" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
height: 80
|
||||
|
@ -71,14 +47,14 @@ FluScrollablePage{
|
|||
FluComboBox {
|
||||
editable: true
|
||||
model: ListModel {
|
||||
id: model_3
|
||||
id: model_2
|
||||
ListElement { text: "Banana" }
|
||||
ListElement { text: "Apple" }
|
||||
ListElement { text: "Coconut" }
|
||||
}
|
||||
onAccepted: {
|
||||
if (find(editText) === -1)
|
||||
model_3.append({text: editText})
|
||||
model_2.append({text: editText})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,12 +52,7 @@ T.ComboBox {
|
|||
autoScroll: control.editable
|
||||
font:control.font
|
||||
readOnly: control.down
|
||||
color: {
|
||||
if(control.disabled) {
|
||||
return FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
||||
}
|
||||
color: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
||||
inputMethodHints: control.inputMethodHints
|
||||
validator: control.validator
|
||||
selectByMouse: true
|
||||
|
@ -80,6 +75,7 @@ T.ComboBox {
|
|||
accepted()
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 140
|
||||
implicitHeight: 32
|
||||
|
@ -99,6 +95,7 @@ T.ComboBox {
|
|||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
}
|
||||
|
||||
popup: T.Popup {
|
||||
y: control.height
|
||||
width: control.width
|
||||
|
@ -112,7 +109,7 @@ T.ComboBox {
|
|||
model: control.delegateModel
|
||||
currentIndex: control.highlightedIndex
|
||||
highlightMoveDuration: 0
|
||||
boundsMovement: Flickable.StopAtBounds
|
||||
boundsMovement: Flickable.StopAtBounds
|
||||
T.ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
enter: Transition {
|
||||
|
|
|
@ -341,9 +341,12 @@ Rectangle {
|
|||
}
|
||||
TableView {
|
||||
id:table_view
|
||||
ListModel{
|
||||
id:model_columns
|
||||
}
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
anchors.fill: parent
|
||||
ScrollBar.horizontal:scroll_bar_h
|
||||
contentX: header_horizontal.contentX
|
||||
ScrollBar.vertical:scroll_bar_v
|
||||
columnWidthProvider: function(column) {
|
||||
var columnObject = d.columns_data[column]
|
||||
|
@ -728,10 +731,9 @@ Rectangle {
|
|||
height: visible ? Math.max(1, contentHeight) : 0
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
clip: true
|
||||
syncDirection: Qt.Horizontal
|
||||
ScrollBar.horizontal:scroll_bar_h_2
|
||||
contentX: table_view.contentX
|
||||
columnWidthProvider: table_view.columnWidthProvider
|
||||
syncView: table_view.rows === 0 ? null : table_view
|
||||
ScrollBar.horizontal:scroll_bar_h
|
||||
onContentXChanged:{
|
||||
timer_horizontal_force_layout.restart()
|
||||
}
|
||||
|
@ -758,16 +760,15 @@ Rectangle {
|
|||
syncView: table_view
|
||||
clip: true
|
||||
model: header_row_model
|
||||
delegate: com_row_header_delegate
|
||||
onContentYChanged:{
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Connections{
|
||||
target: table_model
|
||||
function onRowCountChanged(){
|
||||
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1}))
|
||||
}
|
||||
}
|
||||
onContentYChanged:{
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Timer{
|
||||
id:timer_vertical_force_layout
|
||||
interval: 50
|
||||
|
@ -775,29 +776,19 @@ Rectangle {
|
|||
header_vertical.forceLayout()
|
||||
}
|
||||
}
|
||||
delegate: com_row_header_delegate
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_h
|
||||
id:scroll_bar_h
|
||||
anchors{
|
||||
left: layout_mouse_table.left
|
||||
right: parent.right
|
||||
bottom: layout_mouse_table.bottom
|
||||
}
|
||||
visible: table_view.rows !== 0
|
||||
z:999
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_h_2
|
||||
anchors{
|
||||
left: layout_mouse_table.left
|
||||
right: parent.right
|
||||
bottom: layout_mouse_table.bottom
|
||||
}
|
||||
visible: table_view.rows === 0
|
||||
z:999
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_v
|
||||
id:scroll_bar_v
|
||||
anchors{
|
||||
top: layout_mouse_table.top
|
||||
bottom: layout_mouse_table.bottom
|
||||
|
|
|
@ -80,6 +80,7 @@ T.ComboBox {
|
|||
accepted()
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 140
|
||||
implicitHeight: 32
|
||||
|
@ -99,6 +100,7 @@ T.ComboBox {
|
|||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
}
|
||||
|
||||
popup: T.Popup {
|
||||
y: control.height
|
||||
width: control.width
|
||||
|
|
|
@ -342,9 +342,12 @@ Rectangle {
|
|||
}
|
||||
TableView {
|
||||
id:table_view
|
||||
ListModel{
|
||||
id:model_columns
|
||||
}
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
anchors.fill: parent
|
||||
ScrollBar.horizontal:scroll_bar_h
|
||||
contentX: header_horizontal.contentX
|
||||
ScrollBar.vertical:scroll_bar_v
|
||||
columnWidthProvider: function(column) {
|
||||
var columnObject = d.columns_data[column]
|
||||
|
@ -729,10 +732,9 @@ Rectangle {
|
|||
height: visible ? Math.max(1, contentHeight) : 0
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
clip: true
|
||||
syncDirection: Qt.Horizontal
|
||||
ScrollBar.horizontal:scroll_bar_h_2
|
||||
contentX: table_view.contentX
|
||||
columnWidthProvider: table_view.columnWidthProvider
|
||||
syncView: table_view.rows === 0 ? null : table_view
|
||||
ScrollBar.horizontal:scroll_bar_h
|
||||
onContentXChanged:{
|
||||
timer_horizontal_force_layout.restart()
|
||||
}
|
||||
|
@ -759,16 +761,15 @@ Rectangle {
|
|||
syncView: table_view
|
||||
clip: true
|
||||
model: header_row_model
|
||||
delegate: com_row_header_delegate
|
||||
onContentYChanged:{
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Connections{
|
||||
target: table_model
|
||||
function onRowCountChanged(){
|
||||
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1}))
|
||||
}
|
||||
}
|
||||
onContentYChanged:{
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Timer{
|
||||
id:timer_vertical_force_layout
|
||||
interval: 50
|
||||
|
@ -776,29 +777,19 @@ Rectangle {
|
|||
header_vertical.forceLayout()
|
||||
}
|
||||
}
|
||||
delegate: com_row_header_delegate
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_h
|
||||
id:scroll_bar_h
|
||||
anchors{
|
||||
left: layout_mouse_table.left
|
||||
right: parent.right
|
||||
bottom: layout_mouse_table.bottom
|
||||
}
|
||||
visible: table_view.rows !== 0
|
||||
z:999
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_h_2
|
||||
anchors{
|
||||
left: layout_mouse_table.left
|
||||
right: parent.right
|
||||
bottom: layout_mouse_table.bottom
|
||||
}
|
||||
visible: table_view.rows === 0
|
||||
z:999
|
||||
}
|
||||
FluScrollBar {
|
||||
id: scroll_bar_v
|
||||
id:scroll_bar_v
|
||||
anchors{
|
||||
top: layout_mouse_table.top
|
||||
bottom: layout_mouse_table.bottom
|
||||
|
|
Loading…
Reference in New Issue