feat(tabbar): add modified status

pull/4/head
kateleet 5 years ago
parent 7c89a8078f
commit 1f208792b7

@ -9,6 +9,8 @@ import Cutefish.TextEditor 1.0
Item { Item {
id: control id: control
property var tabName: document.fileName + (document.modified ? " *" : "")
property alias fileUrl: document.fileUrl property alias fileUrl: document.fileUrl
property alias fileName: document.fileName property alias fileName: document.fileName
property bool showLineNumbers: true property bool showLineNumbers: true

@ -43,7 +43,7 @@ FishUI.Window {
delegate: FishUI.TabButton { delegate: FishUI.TabButton {
id: _tabBtn id: _tabBtn
text: _tabView.contentModel.get(index).fileName text: _tabView.contentModel.get(index).tabName
implicitHeight: _tabbar.height implicitHeight: _tabbar.height
implicitWidth: Math.min(_tabbar.width / _tabbar.count, implicitWidth: Math.min(_tabbar.width / _tabbar.count,
_tabBtn.contentWidth) _tabBtn.contentWidth)

Loading…
Cancel
Save