Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CompletionProvider): match Fractal's design #664

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,38 @@ 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-left: 0;
padding-top: 0;
padding-bottom: 0;
}

GtkSourceAssistant row {
border-radius: 6px;
margin: 6px 0;
padding: 6px;
}

GtkSourceAssistant row:selected {
background: alpha(@accent_bg_color, .33);
color: currentColor;
}

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
4 changes: 3 additions & 1 deletion src/Dialogs/Composer/Completion/HashtagProvider.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public class Tuba.HashtagProvider: Tuba.CompletionProvider {

switch (cell.get_column ()) {
case GtkSource.CompletionColumn.ICON:
cell.set_icon_name ("tuba-hashtag-symbolic");
cell.set_widget (new Gtk.Image.from_icon_name ("tuba-hashtag-symbolic") {
pixel_size = 24
});
break;
case GtkSource.CompletionColumn.TYPED_TEXT:
cell.set_markup (@"<b>$(tag.name)</b>\n<span alpha='50%'>$(tag.weekly_use ())</span>");
Expand Down