diff --git a/bin/nwg-drawer b/bin/nwg-drawer index 3bfc956..a3d8cc8 100755 Binary files a/bin/nwg-drawer and b/bin/nwg-drawer differ diff --git a/drawer.css b/drawer.css index c9d70d0..e3c0cad 100644 --- a/drawer.css +++ b/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 +} diff --git a/main.go b/main.go index 218d427..4df7e8f 100644 --- a/main.go +++ b/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())) diff --git a/uicomponents.go b/uicomponents.go index d6be648..28727e9 100644 --- a/uicomponents.go +++ b/uicomponents.go @@ -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 {