aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/conversation_content_view/file_transmission_progress.vala13
-rw-r--r--main/src/ui/util/helper.vala11
-rw-r--r--main/src/ui/widgets/avatar_picture.vala4
-rw-r--r--main/src/ui/widgets/fixed_ratio_picture.vala2
-rw-r--r--main/src/windows/conversation_details.vala4
5 files changed, 0 insertions, 34 deletions
diff --git a/main/src/ui/conversation_content_view/file_transmission_progress.vala b/main/src/ui/conversation_content_view/file_transmission_progress.vala
index 43885c1b..3d893f52 100644
--- a/main/src/ui/conversation_content_view/file_transmission_progress.vala
+++ b/main/src/ui/conversation_content_view/file_transmission_progress.vala
@@ -84,9 +84,7 @@ namespace Dino.Ui {
}
}
-#if GTK_4_14
private static extern Gsk.Path create_progress_arc(Gsk.Path circle, float percentage);
-#endif
public override void snapshot(Gtk.Snapshot snapshot) {
base.snapshot(snapshot);
@@ -97,7 +95,6 @@ namespace Dino.Ui {
float line_width = (float) LINE_WIDTH;
snapshot.translate({get_width() / 2, get_height() / 2});
-#if GTK_4_14
var fg_color = get_color();
get_style_context().lookup_color("accent_color", out fg_color);
var builder = new Gsk.PathBuilder();
@@ -107,16 +104,6 @@ namespace Dino.Ui {
stroke.set_line_cap(Gsk.LineCap.ROUND);
var arc_path = create_progress_arc(circle_path, (float) progress_animation.value);
snapshot.append_stroke(arc_path, stroke, fg_color);
-#else
- var fg_color = get_style_context().get_color();
- get_style_context().lookup_color("accent_color", out fg_color);
- var context = snapshot.append_cairo({{-radius, -radius}, {radius*2, radius*2}});
- context.set_line_cap(Cairo.LineCap.ROUND);
- context.set_line_width(line_width);
- context.set_source_rgba(fg_color.red, fg_color.green, fg_color.blue, fg_color.alpha);
- context.arc(0, 0, radius - line_width / 2, -0.5 * Math.PI, (progress_animation.value - 0.25) * 2 * Math.PI);
- context.stroke();
-#endif
}
}
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala
index e9035be0..a126a196 100644
--- a/main/src/ui/util/helper.vala
+++ b/main/src/ui/util/helper.vala
@@ -415,18 +415,7 @@ public bool use_tooltips() {
}
public static void menu_button_set_icon_with_size(MenuButton menu_button, string icon_name, int pixel_size) {
-#if GTK_4_6 && VALA_0_52
menu_button.set_child(new Image.from_icon_name(icon_name) { pixel_size=pixel_size });
-#else
- menu_button.set_icon_name(icon_name);
- var button = menu_button.get_first_child() as Button;
- if (button == null) return;
- var box = button.child as Box;
- if (box == null) return;
- var image = box.get_first_child() as Image;
- if (image == null) return;
- image.pixel_size = pixel_size;
-#endif
}
}
diff --git a/main/src/ui/widgets/avatar_picture.vala b/main/src/ui/widgets/avatar_picture.vala
index 155c9440..12c635aa 100644
--- a/main/src/ui/widgets/avatar_picture.vala
+++ b/main/src/ui/widgets/avatar_picture.vala
@@ -455,11 +455,7 @@ public class Dino.Ui.AvatarPicture : Gtk.Widget {
label.insert_after(this, null);
label.attributes = new Pango.AttrList();
label.attributes.insert(Pango.attr_foreground_new(uint16.MAX, uint16.MAX, uint16.MAX));
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
picture.content_fit = Gtk.ContentFit.COVER;
-#elif GTK_4_8
- picture.@set("content-fit", 2);
-#endif
picture.insert_after(this, label);
this.notify["model"].connect(on_model_changed);
check_widget_leak(this);
diff --git a/main/src/ui/widgets/fixed_ratio_picture.vala b/main/src/ui/widgets/fixed_ratio_picture.vala
index 6b04ea61..1898efa7 100644
--- a/main/src/ui/widgets/fixed_ratio_picture.vala
+++ b/main/src/ui/widgets/fixed_ratio_picture.vala
@@ -8,9 +8,7 @@ class Dino.Ui.FixedRatioPicture : Gtk.Widget {
public int max_height { get; set; default = int.MAX; }
public File file { get { return inner.file; } set { inner.file = value; } }
public Gdk.Paintable paintable { get { return inner.paintable; } set { inner.paintable = value; } }
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
public Gtk.ContentFit content_fit { get { return inner.content_fit; } set { inner.content_fit = value; } }
-#endif
private Gtk.Picture inner = new Gtk.Picture();
construct {
diff --git a/main/src/windows/conversation_details.vala b/main/src/windows/conversation_details.vala
index e1f3061f..8ec3125b 100644
--- a/main/src/windows/conversation_details.vala
+++ b/main/src/windows/conversation_details.vala
@@ -160,11 +160,7 @@ namespace Dino.Ui.ConversationDetails {
}
private void create_members() {
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
if (model.members_sorted.n_items == 0) return;
-#else
- if (model.members_sorted.model.get_n_items() == 0) return;
-#endif
var selection_model = new NoSelection(model.members_sorted);
var item_factory = new BuilderListItemFactory.from_resource(null, "/im/dino/Dino/muc_member_list_row.ui");