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