From 5c1a6dd5d2b80746723e6c0d1ffc71ce6a68434f Mon Sep 17 00:00:00 2001 From: Evangelos Paterakis Date: Sun, 26 Nov 2023 02:14:35 +0200 Subject: [PATCH] feat(CompletionProvider): match Fractal's design --- data/style.css | 32 +++++++++++++++++++ .../Composer/Completion/EmojiProvider.vala | 4 ++- .../Composer/Completion/HandleProvider.vala | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/data/style.css b/data/style.css index 7c0a35c64..07b43444e 100644 --- a/data/style.css +++ b/data/style.css @@ -610,3 +610,35 @@ video > overlay > revealer > controls { .preview_card:not(.explore):active { background-color: alpha(currentColor, 0.1625); } + +GtkSourceAssistant { + background: @popover_bg_color; + padding: 8px; + /* border-radius of child + padding */ + border-radius: 14px; + +} + +GtkSourceAssistant scrolledwindow undershoot { + background-image: none; + box-shadow: none; +} + +GtkSourceAssistant scrolledwindow .cell.icon { + padding: 0; +} + +GtkSourceAssistant row { + border-radius: 6px; + margin: 6px 0; + padding: 6px; +} + +GtkSourceAssistant row:selected { + background: alpha(@accent_bg_color, .33); +} + +GtkSourceAssistant row:first-child, +GtkSourceAssistant row:last-child { + margin: 0; +} diff --git a/src/Dialogs/Composer/Completion/EmojiProvider.vala b/src/Dialogs/Composer/Completion/EmojiProvider.vala index cbae7efe8..9d3b4c397 100644 --- a/src/Dialogs/Composer/Completion/EmojiProvider.vala +++ b/src/Dialogs/Composer/Completion/EmojiProvider.vala @@ -45,7 +45,9 @@ public class Tuba.EmojiProvider: Tuba.CompletionProvider { switch (cell.get_column ()) { case GtkSource.CompletionColumn.ICON: - var image = new Gtk.Image (); + var image = new Gtk.Image () { + pixel_size = 36 + }; Tuba.Helper.Image.request_paintable (emoji.url, null, (paintable) => { image.paintable = paintable; }); diff --git a/src/Dialogs/Composer/Completion/HandleProvider.vala b/src/Dialogs/Composer/Completion/HandleProvider.vala index 38430f2d0..5c2f4ca04 100644 --- a/src/Dialogs/Composer/Completion/HandleProvider.vala +++ b/src/Dialogs/Composer/Completion/HandleProvider.vala @@ -45,7 +45,7 @@ public class Tuba.HandleProvider: Tuba.CompletionProvider { switch (cell.get_column ()) { case GtkSource.CompletionColumn.ICON: - var avatar = new Adw.Avatar (32, null, true); + var avatar = new Adw.Avatar (36, null, true); avatar.name = account.display_name; Tuba.Helper.Image.request_paintable (account.avatar, null, (paintable) => { avatar.custom_image = paintable;