fix: adapt new tabbar interface

pull/4/head
kateleet 5 years ago
parent 7967442827
commit 60e189561b

@ -25,21 +25,19 @@ FishUI.Window {
anchors.margins: FishUI.Units.smallSpacing / 2 anchors.margins: FishUI.Units.smallSpacing / 2
anchors.rightMargin: FishUI.Units.largeSpacing * 2 anchors.rightMargin: FishUI.Units.largeSpacing * 2
model: _tabView.count
currentIndex : _tabView.currentIndex currentIndex : _tabView.currentIndex
onNewTabClicked: { onNewTabClicked: {
addTab() addTab()
} }
Repeater { delegate: FishUI.TabButton {
id: _repeater id: _tabBtn
model: _tabView.count
FishUI.TabButton {
text: _tabView.contentModel.get(index).fileName text: _tabView.contentModel.get(index).fileName
implicitHeight: parent.height implicitHeight: _tabbar.height
implicitWidth: _repeater.count === 1 ? 150 implicitWidth: Math.min(_tabbar.width / _tabbar.count,
: parent.width / _repeater.count _tabBtn.contentWidth)
ToolTip.delay: 1000 ToolTip.delay: 1000
ToolTip.timeout: 5000 ToolTip.timeout: 5000
@ -60,7 +58,6 @@ FishUI.Window {
} }
} }
} }
}
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
@ -104,7 +101,7 @@ FishUI.Window {
id: textEditorCompeont id: textEditorCompeont
TextEditor { TextEditor {
fileUrl: "" fileUrl: "file:///home/cutefish/桌面/winepath"
} }
} }

Loading…
Cancel
Save