Skip to content

Commit

Permalink
feat(CompletionProvider): match Fractal's design
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Nov 26, 2023
1 parent a25615c commit 5c1a6dd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
32 changes: 32 additions & 0 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 3 additions & 1 deletion src/Dialogs/Composer/Completion/EmojiProvider.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
2 changes: 1 addition & 1 deletion src/Dialogs/Composer/Completion/HandleProvider.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c1a6dd

Please sign in to comment.