some improvement to appearance

This commit is contained in:
piotr 2021-05-30 01:34:47 +02:00
parent 913e65c58b
commit aec55b2197
4 changed files with 14 additions and 8 deletions

Binary file not shown.

View File

@ -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
}

View File

@ -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()))

View File

@ -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 {