mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-09-11 14:07:17 +03:00
some improvement to appearance
This commit is contained in:
parent
913e65c58b
commit
aec55b2197
BIN
bin/nwg-drawer
BIN
bin/nwg-drawer
Binary file not shown.
13
drawer.css
13
drawer.css
@ -1,13 +1,8 @@
|
|||||||
window {
|
window {
|
||||||
background-color: rgba (36, 47, 79, 0.9);
|
background-color: rgba (36, 47, 79, 0.95);
|
||||||
color: #eeeeee
|
color: #eeeeee
|
||||||
}
|
}
|
||||||
|
|
||||||
list {
|
|
||||||
background: none;
|
|
||||||
border-radius: 15px
|
|
||||||
}
|
|
||||||
|
|
||||||
entry {
|
entry {
|
||||||
background-color: rgba (0, 0, 0, 0.2)
|
background-color: rgba (0, 0, 0, 0.2)
|
||||||
}
|
}
|
||||||
@ -25,3 +20,9 @@ button:hover {
|
|||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
border-bottom: 1px dotted gray
|
border-bottom: 1px dotted gray
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#files-box {
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px dotted gray;
|
||||||
|
border-radius: 15px
|
||||||
|
}
|
||||||
|
3
main.go
3
main.go
@ -323,9 +323,11 @@ func main() {
|
|||||||
|
|
||||||
placeholder, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)
|
placeholder, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)
|
||||||
resultsWrapper.PackStart(placeholder, true, true, 0)
|
resultsWrapper.PackStart(placeholder, true, true, 0)
|
||||||
|
placeholder.SetSizeRequest(20, 20)
|
||||||
|
|
||||||
wrapper, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
wrapper, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
||||||
fileSearchResultWrapper, _ = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
fileSearchResultWrapper, _ = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
||||||
|
fileSearchResultWrapper.SetProperty("name", "files-box")
|
||||||
wrapper.PackStart(fileSearchResultWrapper, true, false, 0)
|
wrapper.PackStart(fileSearchResultWrapper, true, false, 0)
|
||||||
resultsWrapper.PackEnd(wrapper, false, false, 10)
|
resultsWrapper.PackEnd(wrapper, false, false, 10)
|
||||||
|
|
||||||
@ -337,6 +339,7 @@ func main() {
|
|||||||
win.ShowAll()
|
win.ShowAll()
|
||||||
fileSearchResultWrapper.SetSizeRequest(appFlowBox.GetAllocatedWidth(), 1)
|
fileSearchResultWrapper.SetSizeRequest(appFlowBox.GetAllocatedWidth(), 1)
|
||||||
categoriesWrapper.SetSizeRequest(1, categoriesWrapper.GetAllocatedHeight()*2)
|
categoriesWrapper.SetSizeRequest(1, categoriesWrapper.GetAllocatedHeight()*2)
|
||||||
|
fileSearchResultWrapper.Hide()
|
||||||
|
|
||||||
t := time.Now()
|
t := time.Now()
|
||||||
println(fmt.Sprintf("UI created in %v ms. Thank you for your patience.", t.Sub(timeStart).Milliseconds()))
|
println(fmt.Sprintf("UI created in %v ms. Thank you for your patience.", t.Sub(timeStart).Milliseconds()))
|
||||||
|
@ -257,7 +257,7 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
|
|||||||
return button
|
return button
|
||||||
}
|
}
|
||||||
|
|
||||||
func setUpFileSearchResult() *gtk.FlowBox {
|
func setUpFileSearchResultContainer() *gtk.FlowBox {
|
||||||
if fileSearchResultFlowBox != nil {
|
if fileSearchResultFlowBox != nil {
|
||||||
fileSearchResultFlowBox.Destroy()
|
fileSearchResultFlowBox.Destroy()
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
|||||||
if fileSearchResultFlowBox != nil {
|
if fileSearchResultFlowBox != nil {
|
||||||
fileSearchResultFlowBox.Destroy()
|
fileSearchResultFlowBox.Destroy()
|
||||||
}
|
}
|
||||||
fileSearchResultFlowBox = setUpFileSearchResult()
|
fileSearchResultFlowBox = setUpFileSearchResultContainer()
|
||||||
for key := range userDirsMap {
|
for key := range userDirsMap {
|
||||||
if key != "home" {
|
if key != "home" {
|
||||||
fileSearchResults = nil
|
fileSearchResults = nil
|
||||||
@ -321,11 +321,13 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
|||||||
}
|
}
|
||||||
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
||||||
fileSearchResultFlowBox.Hide()
|
fileSearchResultFlowBox.Hide()
|
||||||
|
statusLabel.SetText("0 results")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if fileSearchResultFlowBox != nil {
|
if fileSearchResultFlowBox != nil {
|
||||||
fileSearchResultFlowBox.Destroy()
|
fileSearchResultFlowBox.Destroy()
|
||||||
}
|
}
|
||||||
|
fileSearchResultWrapper.Hide()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if fileSearchResultFlowBox != nil {
|
if fileSearchResultFlowBox != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user