mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-08-16 17:20:22 +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 {
|
||||
background-color: rgba (36, 47, 79, 0.9);
|
||||
background-color: rgba (36, 47, 79, 0.95);
|
||||
color: #eeeeee
|
||||
}
|
||||
|
||||
list {
|
||||
background: none;
|
||||
border-radius: 15px
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: rgba (0, 0, 0, 0.2)
|
||||
}
|
||||
@ -25,3 +20,9 @@ button:hover {
|
||||
padding-bottom: 5px;
|
||||
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)
|
||||
resultsWrapper.PackStart(placeholder, true, true, 0)
|
||||
placeholder.SetSizeRequest(20, 20)
|
||||
|
||||
wrapper, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
||||
fileSearchResultWrapper, _ = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
||||
fileSearchResultWrapper.SetProperty("name", "files-box")
|
||||
wrapper.PackStart(fileSearchResultWrapper, true, false, 0)
|
||||
resultsWrapper.PackEnd(wrapper, false, false, 10)
|
||||
|
||||
@ -337,6 +339,7 @@ func main() {
|
||||
win.ShowAll()
|
||||
fileSearchResultWrapper.SetSizeRequest(appFlowBox.GetAllocatedWidth(), 1)
|
||||
categoriesWrapper.SetSizeRequest(1, categoriesWrapper.GetAllocatedHeight()*2)
|
||||
fileSearchResultWrapper.Hide()
|
||||
|
||||
t := time.Now()
|
||||
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
|
||||
}
|
||||
|
||||
func setUpFileSearchResult() *gtk.FlowBox {
|
||||
func setUpFileSearchResultContainer() *gtk.FlowBox {
|
||||
if fileSearchResultFlowBox != nil {
|
||||
fileSearchResultFlowBox.Destroy()
|
||||
}
|
||||
@ -309,7 +309,7 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
||||
if fileSearchResultFlowBox != nil {
|
||||
fileSearchResultFlowBox.Destroy()
|
||||
}
|
||||
fileSearchResultFlowBox = setUpFileSearchResult()
|
||||
fileSearchResultFlowBox = setUpFileSearchResultContainer()
|
||||
for key := range userDirsMap {
|
||||
if key != "home" {
|
||||
fileSearchResults = nil
|
||||
@ -321,11 +321,13 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
||||
}
|
||||
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
||||
fileSearchResultFlowBox.Hide()
|
||||
statusLabel.SetText("0 results")
|
||||
}
|
||||
} else {
|
||||
if fileSearchResultFlowBox != nil {
|
||||
fileSearchResultFlowBox.Destroy()
|
||||
}
|
||||
fileSearchResultWrapper.Hide()
|
||||
}
|
||||
} else {
|
||||
if fileSearchResultFlowBox != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user