mirror of
https://github.com/transmission/transmission
synced 2025-03-04 10:38:13 +00:00
gtk: fix window width (#1069)
GTK window width cannot be smaller than the longest torrent title Source: https://trac.transmissionbt.com/ticket/6128 Co-authored-by: Charles Kerr <ckerr@github.com>
This commit is contained in:
parent
c0c463d660
commit
f6030b1d79
1 changed files with 2 additions and 4 deletions
|
@ -408,7 +408,7 @@ static void get_size_compact(TorrentCellRenderer* cell, GtkWidget* widget, gint*
|
|||
|
||||
if (width != NULL)
|
||||
{
|
||||
*width = xpad * 2 + icon_size.width + GUI_PAD + name_size.width + GUI_PAD + BAR_WIDTH + GUI_PAD + stat_size.width;
|
||||
*width = xpad * 2 + icon_size.width + GUI_PAD + BAR_WIDTH + GUI_PAD + stat_size.width;
|
||||
}
|
||||
|
||||
if (height != NULL)
|
||||
|
@ -420,8 +420,6 @@ static void get_size_compact(TorrentCellRenderer* cell, GtkWidget* widget, gint*
|
|||
g_object_unref(icon);
|
||||
}
|
||||
|
||||
#define MAX3(a, b, c) MAX(a, MAX(b, c))
|
||||
|
||||
static void get_size_full(TorrentCellRenderer* cell, GtkWidget* widget, gint* width, gint* height)
|
||||
{
|
||||
int xpad;
|
||||
|
@ -465,7 +463,7 @@ static void get_size_full(TorrentCellRenderer* cell, GtkWidget* widget, gint* wi
|
|||
|
||||
if (width != NULL)
|
||||
{
|
||||
*width = xpad * 2 + icon_size.width + GUI_PAD + MAX3(name_size.width, prog_size.width, stat_size.width);
|
||||
*width = xpad * 2 + icon_size.width + GUI_PAD + MAX(prog_size.width, stat_size.width);
|
||||
}
|
||||
|
||||
if (height != NULL)
|
||||
|
|
Loading…
Add table
Reference in a new issue