diamondburned / dissent

Tiny native Discord app
https://flathub.org/apps/details/so.libdb.dissent
GNU General Public License v3.0
1.25k stars 40 forks source link

change direct message icon #104

Closed ghost closed 1 year ago

ghost commented 1 year ago

sample

yes/no? thoughts? to me it still looks like a placeholder icon, but a slightly nicer

TheK0tYaRa commented 1 year ago

Seems too flat, may confuse Discord's law speakers into DMCA

diamondburned commented 1 year ago

OK, I'm not sure why the DM icon is a green circle on your screen. Perhaps we need to embed an SVG.

It should look like this:

image

diamondburned commented 1 year ago

Relying on the icon theme doesn't seem like the best idea.

ghost commented 1 year ago

image b6fc6e64-db68-40f9-bb94-e841d10583ff

Currently it's a status icon for when a user is available, and it's different across icon themes. Default Adwaita has the speech bubble, but it's huge. What icon theme are you using?

diamondburned commented 1 year ago

What icon theme are you using?

I'm using Papirus.

I'll probably get a new icon from Google Material Icons.

ghost commented 1 year ago

image don't use b908c49bf1942f74413979687fb45d8d34f2db09, https://fonts.google.com/icons?icon.style=Rounded&icon.query=message indeed has good icons

diamondburned commented 1 year ago

Hmm, I can't seem to get the CI to run.

ghost commented 1 year ago

this is how it looks currently (39487c82f2849b5cdcbdb4794bef3597cc92fa84): sample2 (themes from left to right: Dracula, Adwaita, Adwaita-dark) (with libadwaita compiled)

diamondburned commented 1 year ago

I think it looks a bit too big.

diamondburned commented 1 year ago

Can you apply this diff?

diff --git a/internal/gtkcord/sidebar/directbutton/button.go b/internal/gtkcord/sidebar/directbutton/button.go
index 44a6c08..989932e 100644
--- a/internal/gtkcord/sidebar/directbutton/button.go
+++ b/internal/gtkcord/sidebar/directbutton/button.go
@@ -2,6 +2,7 @@ package directbutton

 import (
    "context"
+   "math"

    "github.com/diamondburned/gotk4/pkg/gtk/v4"
    "github.com/diamondburned/gotkit/gtkutil/cssutil"
@@ -23,6 +24,10 @@ var dmButtonCSS = cssutil.Applier("sidebar-dm-button-overlay", `
        padding: 4px 12px;
        border-radius: 0;
    }
+   .sidebar-dm-button image {
+       padding-top: 4px;
+       padding-bottom: 2px;
+   }
 `)

 func NewButton(ctx context.Context, open func()) *Button {
@@ -30,14 +35,13 @@ func NewButton(ctx context.Context, open func()) *Button {

    icon := gtk.NewImageFromPixbuf(icons.Pixbuf("dm"))
    icon.SetIconSize(gtk.IconSizeLarge)
-   icon.SetPixelSize(gtkcord.GuildIconSize)
+   icon.SetPixelSize(int(math.Round(gtkcord.GuildIconSize * 0.85)))

    b.Button = gtk.NewButton()
    b.Button.AddCSSClass("sidebar-dm-button")
    b.Button.SetTooltipText("Direct Messages")
    b.Button.SetChild(icon)
    b.Button.SetHasFrame(false)
-   b.Button.SetHAlign(gtk.AlignCenter)
    b.Button.ConnectClicked(func() {
        b.Pill.State = sidebutton.PillActive
        b.Pill.Invalidate()
diff --git a/internal/gtkcord/sidebar/guilds/guilds.go b/internal/gtkcord/sidebar/guilds/guilds.go
index 16bdd67..b0db65a 100644
--- a/internal/gtkcord/sidebar/guilds/guilds.go
+++ b/internal/gtkcord/sidebar/guilds/guilds.go
@@ -54,6 +54,9 @@ type currentGuild struct {
 }

 var viewCSS = cssutil.Applier("guild-view", `
+   .guild-view {
+       margin: 4px 0;
+   }
    .guild-view button:active:not(:hover) {
        background: initial;
    }