Commit b4acf816 authored by Timm Bäder's avatar Timm Bäder 👎

Merge branch '1422-gtkentry-s-minimum-width-is-hardcoded-to-150px-GTK4' into 'master'

gtkentry: set minimum-width to 0 instead of 150

Closes #1422 and evince#1002

See merge request GNOME/gtk!393
parents 62871400 45e6e0cd
Pipeline #37579 failed with stages
in 5 minutes and 42 seconds
......@@ -166,7 +166,7 @@
* .insertion-cursor.
*/
#define MIN_ENTRY_WIDTH 150
#define NAT_ENTRY_WIDTH 150
#define MAX_ICONS 2
......@@ -3169,13 +3169,13 @@ gtk_entry_measure (GtkWidget *widget,
digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
char_pixels = (MAX (char_width, digit_width) + PANGO_SCALE - 1) / PANGO_SCALE;
if (priv->width_chars < 0)
min = MIN_ENTRY_WIDTH;
else
if (priv->width_chars >= 0)
min = char_pixels * priv->width_chars;
else
min = 0;
if (priv->max_width_chars < 0)
nat = min;
nat = NAT_ENTRY_WIDTH;
else
nat = char_pixels * priv->max_width_chars;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment