[gnome-builder/wip/gtk4-port: 775/1774] plugins/omni-gutter: tweak breakpoint styling
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 775/1774] plugins/omni-gutter: tweak breakpoint styling
- Date: Mon, 11 Jul 2022 22:31:23 +0000 (UTC)
commit 1f9e162a896951ff8a74fd91a9ee01a2d757a2b8
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 27 14:16:14 2022 -0700
plugins/omni-gutter: tweak breakpoint styling
Flip it, basically. Adjust text to fit better.
src/plugins/omni-gutter/gbp-omni-gutter-renderer.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
index b49eadf92..bf048adcf 100644
--- a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
+++ b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
@@ -55,8 +55,8 @@
#define CHANGE_WIDTH 2
#define DELETE_WIDTH 5
#define DELETE_HEIGHT 2
-#define BREAKPOINT_XPAD 2
-#define BREAKPOINT_CORNER_RADIUS 7
+#define BREAKPOINT_XPAD (CHANGE_WIDTH + 1)
+#define BREAKPOINT_CORNER_RADIUS 5
#define IS_BREAKPOINT(i) ((i)->is_breakpoint || (i)->is_countpoint || (i)->is_watchpoint)
#define IS_DIAGNOSTIC(i) ((i)->is_error || (i)->is_warning || (i)->is_note)
@@ -882,7 +882,7 @@ gbp_omni_gutter_renderer_begin (GtkSourceGutterRenderer *renderer,
/* Create a new layout for rendering lines to */
self->layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), "");
pango_layout_set_alignment (self->layout, PANGO_ALIGN_RIGHT);
- pango_layout_set_width (self->layout, (width - CHANGE_WIDTH - 2) * PANGO_SCALE);
+ pango_layout_set_width (self->layout, (width - BREAKPOINT_XPAD - 4) * PANGO_SCALE);
}
static gboolean
@@ -1018,14 +1018,14 @@ draw_breakpoint_bg (GbpOmniGutterRenderer *self,
rgba.alpha *= 0.4;
}
- rounded_rect = GSK_ROUNDED_RECT_INIT (BREAKPOINT_XPAD, line_y, width - BREAKPOINT_XPAD, height);
- rounded_rect.corner[0] = GRAPHENE_SIZE_INIT (BREAKPOINT_CORNER_RADIUS, BREAKPOINT_CORNER_RADIUS);
- rounded_rect.corner[3] = GRAPHENE_SIZE_INIT (BREAKPOINT_CORNER_RADIUS, BREAKPOINT_CORNER_RADIUS);
+ rounded_rect = GSK_ROUNDED_RECT_INIT (0, line_y, width - BREAKPOINT_XPAD, height);
+ rounded_rect.corner[1] = GRAPHENE_SIZE_INIT (BREAKPOINT_CORNER_RADIUS, BREAKPOINT_CORNER_RADIUS);
+ rounded_rect.corner[2] = GRAPHENE_SIZE_INIT (BREAKPOINT_CORNER_RADIUS, BREAKPOINT_CORNER_RADIUS);
gtk_snapshot_push_rounded_clip (snapshot, &rounded_rect);
gtk_snapshot_append_color (snapshot,
&rgba,
- &GRAPHENE_RECT_INIT (0, line_y, width + 10, height));
+ &GRAPHENE_RECT_INIT (0, line_y, width, height));
gtk_snapshot_pop (snapshot);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]