add buttons to Fime

This commit is contained in:
Xuan Sang LE 2018-03-12 19:33:11 +01:00
parent d310d2c03b
commit 9d5f2250ba
3 changed files with 14 additions and 6 deletions

View File

@ -77,6 +77,12 @@ class Files extends this.OS.GUI.BaseApplication
@bindKey "CTRL-C", () -> me.actionEdit "#{me.name}-copy"
@bindKey "CTRL-P", () -> me.actionEdit "#{me.name}-paste"
(@find "btgrid").set "onbtclick", (e) ->
me.view.set 'view', "icon"
me.setting.view = "icon"
(@find "btlist").set "onbtclick", (e) ->
me.view.set 'view', "list"
me.setting.view = "list"
@chdir null
applySetting: (k) ->
@ -154,7 +160,7 @@ class Files extends this.OS.GUI.BaseApplication
me.view.set 'view', e.item.data.type
me.setting.view = e.item.data.type
},
], onmenuselect: (e) -> me.actionView e
], onmenuselect: (e) -> me.actionView e.item.data.dataid
},
]
menu
@ -168,7 +174,7 @@ class Files extends this.OS.GUI.BaseApplication
@trigger "resize"
actionView: (e) ->
switch e.item.data.dataid
switch e
when "#{@name}-hidden"
#@.view.set "showhidden", e.item.data.checked
@registry "showhidden", e.item.data.checked

View File

@ -29,9 +29,8 @@ afx-app-window[data-id ='files-app-window'] afx-grid-view afx-grid-row.grid_row_
}
afx-app-window[data-id ='files-app-window'] button{
height: 23px;
border-radius: 3px;
border-radius: 0;
padding-top:2px;
margin-left: 5px;
}
afx-app-window[data-id ='files-app-window'] input{

View File

@ -1,9 +1,12 @@
<afx-app-window data-id = "files-app-window" apptitle="Files" width="600" height="400">
<afx-vbox>
<afx-hbox data-height = "30" data-id = "nav-bar">
<afx-button data-width = "30" data-id = "btback" iconclass = "fa fa-arrow-left"></afx-button>
<afx-button data-width = "23" data-id = "btback" iconclass = "fa fa-arrow-left"></afx-button>
<input type = "text" data-id = "navinput"></input>
<div data-width = "5"></div>
<div data-width = "2"></div>
<afx-button data-width = "23" data-id = "btgrid" iconclass = "fa fa-th"></afx-button>
<div data-width = "2"></div>
<afx-button data-width = "23" data-id = "btlist" iconclass = "fa fa-th-list"></afx-button>
</afx-hbox>
<afx-hbox>
<afx-list-view data-id = "favouri" data-width = "150" min-width="100">