4 Commits

Author SHA1 Message Date
Piotr Miller
27718a9f1b Merge pull request #5 from nwg-piotr/nodisplay
More appearance personalization
2021-06-29 23:54:17 +02:00
piotr
b4f0f70f56 default css modified 2021-06-29 17:32:44 +02:00
piotr
f54be1c13a name property for category buttons 2021-06-29 17:24:48 +02:00
piotr
cd6e544adc wrong resources path fixed 2021-06-26 23:45:46 +02:00
7 changed files with 14 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ Usage of nwg-drawer:
-lang string -lang string
force lang, e.g. "en", "pl" force lang, e.g. "en", "pl"
-o string -o string
name of the Output to display the menu on (sway only) name of the Output to display the drawer on (sway only)
-ovl -ovl
use OVerLay layer use OVerLay layer
-s string -s string

Binary file not shown.

View File

@@ -3,11 +3,12 @@ window {
color: #eeeeee color: #eeeeee
} }
/* search entry */
entry { entry {
background-color: rgba (0, 0, 0, 0.2) background-color: rgba (0, 0, 0, 0.2)
} }
button { button, image {
background: none; background: none;
border: none border: none
} }
@@ -16,6 +17,11 @@ button:hover {
background-color: rgba (255, 255, 255, 0.1) background-color: rgba (255, 255, 255, 0.1)
} }
/* in case you wanted to give category buttons a different look */
#category-button {
margin: 0 10px 0 10px
}
#pinned-box { #pinned-box {
padding-bottom: 5px; padding-bottom: 5px;
border-bottom: 1px dotted gray border-bottom: 1px dotted gray

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/nwg-piotr/nwg-menu module github.com/nwg-piotr/nwg-drawer
go 1.16 go 1.16

View File

@@ -19,7 +19,7 @@ import (
"github.com/gotk3/gotk3/gtk" "github.com/gotk3/gotk3/gtk"
) )
const version = "0.1.1" const version = "0.1.3"
var ( var (
appDirs []string appDirs []string
@@ -98,7 +98,7 @@ var (
// Flags // Flags
var cssFileName = flag.String("s", "drawer.css", "Styling: css file name") 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 (sway only)") var targetOutput = flag.String("o", "", "name of the Output to display the drawer on (sway only)")
var displayVersion = flag.Bool("v", false, "display Version information") var displayVersion = flag.Bool("v", false, "display Version information")
var overlay = flag.Bool("ovl", false, "use OVerLay layer") var overlay = flag.Bool("ovl", false, "use OVerLay layer")
var iconSize = flag.Int("is", 64, "Icon Size") var iconSize = flag.Int("is", 64, "Icon Size")

View File

@@ -268,7 +268,7 @@ func listDesktopFiles() []string {
} }
func setUpCategories() { func setUpCategories() {
path := filepath.Join(getDataHome(), "nwg-menu/desktop-directories") path := filepath.Join(getDataHome(), "nwg-drawer/desktop-directories")
var other category var other category
for _, cName := range categoryNames { for _, cName := range categoryNames {

View File

@@ -113,6 +113,7 @@ func setUpCategoriesButtonBox() *gtk.EventBox {
hBox, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0) hBox, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
eventBox.Add(hBox) eventBox.Add(hBox)
button, _ := gtk.ButtonNewWithLabel("All") button, _ := gtk.ButtonNewWithLabel("All")
button.SetProperty("name", "category-button")
button.Connect("clicked", func(item *gtk.Button) { button.Connect("clicked", func(item *gtk.Button) {
searchEntry.SetText("") searchEntry.SetText("")
appFlowBox = setUpAppsFlowBox(nil, "") appFlowBox = setUpAppsFlowBox(nil, "")
@@ -126,6 +127,7 @@ func setUpCategoriesButtonBox() *gtk.EventBox {
for _, cat := range categories { for _, cat := range categories {
if isSupposedToShowUp(cat.Name) { if isSupposedToShowUp(cat.Name) {
button, _ = gtk.ButtonNewFromIconName(cat.Icon, gtk.ICON_SIZE_MENU) button, _ = gtk.ButtonNewFromIconName(cat.Icon, gtk.ICON_SIZE_MENU)
button.SetProperty("name", "category-button")
catButtons = append(catButtons, button) catButtons = append(catButtons, button)
button.SetLabel(cat.DisplayName) button.SetLabel(cat.DisplayName)
hBox.PackStart(button, false, false, 0) hBox.PackStart(button, false, false, 0)