Files
gtk/gtk
Christian Hergert 462920ea21 gtk/textview: quanitize X/Y by device pixels
This attempts to improve the somewhat "erratic" feeling of scrolling a
GtkTextView with fractional scaling. However, it also improves the
situation where you have a natural integer scaling factor such as 2x.

To do so, it quantizes the X/Y origin of the visible rect to something that
naturally alignes with device pixels. By doing so this aims to get
consistent pixel alignment when hinting so that you no longer see jumps
as the Y position of the buffer changes. X is also done for symmetry.

The buffer itself is left in integer coordinates to avoid any sort
of ABI breakage with existing applications. Only the origin x/y of the
drawing area is affected and thus should only affect the ABI of
gtk_text_view_get_visible_rect() by < 1 device pixel.

Applications which require precision in the visible rect origin may use
the new API introduced here as gtk_text_view_get_visible_offset(). This
provides the X,Y point as doubles. graphene_point_t was not used here
beacuse that appeared to cause aliasing due to float usage.

GNOME/GtkSourceView!375 provides an example of consuming this new API to
keep line numbers aligned in the same fashion as the textview contents.
2024-10-29 14:46:21 -07:00
..
2024-07-05 13:22:54 +02:00
2024-08-06 17:53:41 +02:00
2024-10-21 07:35:42 +02:00
2023-06-08 19:51:28 -04:00
2024-10-02 21:05:21 -04:00
2024-02-20 12:19:48 -05:00
2023-12-04 07:05:43 +02:00
2024-02-08 23:31:33 -05:00
2024-01-07 20:44:05 -05:00
2024-01-07 20:44:05 -05:00
2024-10-08 13:41:04 -05:00
2024-05-19 17:27:37 -04:00
2024-08-05 14:38:23 +03:00
2024-05-19 17:27:37 -04:00
2024-10-04 15:08:34 -04:00
2024-05-15 20:54:43 -04:00
2023-12-26 21:57:04 -05:00
2024-04-22 18:55:35 +04:00
2024-08-11 10:02:03 -04:00
2024-05-15 20:54:43 -04:00
2024-05-31 11:47:27 +02:00
2024-01-07 20:44:05 -05:00
2024-10-21 11:39:04 -04:00
2023-06-19 22:20:05 -04:00
2024-09-26 18:41:13 +02:00
2023-08-05 03:51:53 +02:00
2024-05-31 11:47:28 +02:00
2024-05-31 11:47:28 +02:00
2024-10-21 11:39:04 -04:00
2024-10-21 17:24:53 -04:00
2024-05-31 11:47:28 +02:00
2024-09-25 02:50:22 +02:00
2024-09-25 02:50:22 +02:00
2023-05-13 12:38:24 -04:00
2023-05-13 12:38:24 -04:00
2024-05-28 16:37:48 +02:00
2024-05-31 11:47:28 +02:00
2024-04-29 00:35:27 -04:00
2024-04-29 00:35:27 -04:00
2023-08-05 03:51:50 +02:00
2023-08-05 03:51:50 +02:00
2023-08-05 03:51:50 +02:00
2023-05-09 17:00:39 +02:00
2024-08-12 11:18:17 +03:00
2024-08-12 11:18:17 +03:00
2024-05-19 17:27:37 -04:00
2024-01-07 20:44:05 -05:00
2024-10-21 05:25:25 +02:00
2024-10-21 11:39:04 -04:00
2024-10-21 07:35:42 +02:00
2024-10-21 07:35:42 +02:00
2024-01-07 20:44:05 -05:00
2024-05-31 11:47:28 +02:00
2023-06-07 07:16:26 -04:00
2024-10-10 10:58:35 +02:00
2024-09-01 22:49:34 +02:00
2024-10-20 23:53:04 +02:00