mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-13 05:04:22 +02:00
add tab bar
This commit is contained in:
@ -70,14 +70,28 @@ class NotePad extends this.OS.GUI.BaseApplication
|
||||
{ text: "Desktop", path: 'home:///.desktop', iconclass: "fa fa-desktop" },
|
||||
]
|
||||
|
||||
@open @currfile if @currfile
|
||||
@tabarea = @find "tabarea"
|
||||
#@tabarea.set "closable", true
|
||||
@open @currfile
|
||||
|
||||
open: (file) ->
|
||||
#find table
|
||||
@newtab "undefined".asFileHandler() unless file
|
||||
return @newtab "undefined".asFileHandler() unless file
|
||||
me = @
|
||||
file.read (d) ->
|
||||
return unless d
|
||||
me.scheme.set "apptitle", file.basename
|
||||
me.editor.setValue d, -1
|
||||
file.cache = d
|
||||
me.newtab file
|
||||
|
||||
newtab: (file) ->
|
||||
file.text = if file.basename then file.basename else "undefined"
|
||||
file.cache = "" unless file.cache
|
||||
cnt = @tabarea.get "count"
|
||||
@tabarea.push file, true
|
||||
@tabarea.set "selected", cnt
|
||||
@editor.setValue file.cache, -1
|
||||
|
||||
chdir: (p) ->
|
||||
me = @
|
||||
|
@ -16,4 +16,26 @@ afx-app-window[data-id="notepad"] afx-vbox[data-id="bottom-vbox"]{
|
||||
}
|
||||
afx-app-window[data-id="notepad"] .afx-window-content {
|
||||
background-color: #f6F6F6;
|
||||
}
|
||||
|
||||
afx-tab-container[data-id="tabarea"] afx-list-view li {
|
||||
background-color: #dfdfdf;
|
||||
color:#272822;
|
||||
border: 0;
|
||||
border-top: 1px solid #a6a6a6;
|
||||
border-right: 1px solid #a6a6a6;
|
||||
border-radius: 0;
|
||||
}
|
||||
afx-tab-container[data-id="tabarea"] afx-list-view{
|
||||
padding:0;
|
||||
margin: 0;
|
||||
border-left: 1px solid #a6a6a6;
|
||||
border-bottom: 1px solid #a6a6a6;
|
||||
}
|
||||
/*afx-tab-container[data-id="tabarea"] afx-list-view i.closable:before{
|
||||
color: white;
|
||||
}*/
|
||||
afx-tab-container[data-id="tabarea"] afx-list-view li.selected {
|
||||
background-color: #f6F6F6;
|
||||
border-radius: 0;
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<afx-file-view data-id = "fileview" view='tree' status = false></afx-file-view>
|
||||
</afx-hbox>
|
||||
<afx-hbox>
|
||||
<afx-tab-container data-id="tabarea" data-height="26" closable = true></afx-tab-container>
|
||||
<div data-id="datarea"></div>
|
||||
<afx-vbox data-height="30" data-id="bottom-vbox">
|
||||
<div ><span data-id = "editorstat"></span></div>
|
||||
|
Reference in New Issue
Block a user