command line arguments altered

This commit is contained in:
piotr 2021-05-29 03:11:16 +02:00
parent 272e06bb41
commit 49f8e635ba
2 changed files with 5 additions and 6 deletions

View File

@ -108,8 +108,8 @@ var (
var cssFileName = flag.String("s", "drawer.css", "Styling: css file name")
var targetOutput = flag.String("o", "", "name of the Output to display the menu on")
var displayVersion = flag.Bool("v", false, "display Version information")
var iconSizeLarge = flag.Int("isl", 64, "Icon Size Large")
var iconSizeSmall = flag.Int("iss", 16, "Icon Size Small")
var iconSize = flag.Int("is", 64, "Icon Size")
var fsColumns = flag.Uint("fscol", 2, "File Search result COLumns")
var columnsNumber = flag.Uint("c", 6, "number of Columns")
var itemSpacing = flag.Uint("spacing", 20, "icon spacing")
var lang = flag.String("lang", "", "force lang, e.g. \"en\", \"pl\"")

View File

@ -32,7 +32,7 @@ func setUpPinnedFlowBox() *gtk.FlowBox {
entry := id2entry[desktopID]
btn, _ := gtk.ButtonNew()
pixbuf, _ := createPixbuf(entry.Icon, *iconSizeLarge)
pixbuf, _ := createPixbuf(entry.Icon, *iconSize)
img, err := gtk.ImageNewFromPixbuf(pixbuf)
if err != nil {
println(err, entry.Icon)
@ -219,7 +219,7 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
button, _ := gtk.ButtonNew()
button.SetAlwaysShowImage(true)
pixbuf, _ := createPixbuf(entry.Icon, *iconSizeLarge)
pixbuf, _ := createPixbuf(entry.Icon, *iconSize)
img, _ := gtk.ImageNewFromPixbuf(pixbuf)
button.SetImage(img)
button.SetImagePosition(gtk.POS_TOP)
@ -268,7 +268,6 @@ func setUpFileSearchResult() *gtk.FlowBox {
cancelClose()
})
fileSearchResultWrapper.PackStart(flowBox, false, false, 10)
flowBox.ShowAll() // TODO: check if necessary here
return flowBox
}
@ -362,7 +361,7 @@ func searchUserDir(dir string) {
fileSearchResultFlowBox.Hide()
statusLabel.SetText(fmt.Sprintf("%v results", fileSearchResultFlowBox.GetChildren().Length()))
num := uint(fileSearchResultFlowBox.GetChildren().Length() / 3)
num := uint(fileSearchResultFlowBox.GetChildren().Length() / *fsColumns)
fileSearchResultFlowBox.SetMinChildrenPerLine(num + 1)
fileSearchResultFlowBox.SetMaxChildrenPerLine(num + 1)
//While moving focus with arrow keys we want buttons to get focus directly