Fixed expanders not shrinking back to their original size
This commit is contained in:
parent
c3ca5e027d
commit
98fe587316
@ -441,6 +441,12 @@ static void update_surface_size(void) {
|
|||||||
|
|
||||||
static void widget_allocate(GtkWidget* widget, GdkRectangle* allocation, gpointer data) {
|
static void widget_allocate(GtkWidget* widget, GdkRectangle* allocation, gpointer data) {
|
||||||
(void) data;
|
(void) data;
|
||||||
|
if(GTK_IS_FLOW_BOX_CHILD(widget)) {
|
||||||
|
GtkWidget* expander = gtk_bin_get_child(GTK_BIN(widget));
|
||||||
|
if(GTK_IS_EXPANDER(expander) && gtk_expander_get_expanded(GTK_EXPANDER(expander))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(max_height > 0) {
|
if(max_height > 0) {
|
||||||
if(allocation->height > max_height) {
|
if(allocation->height > max_height) {
|
||||||
int64_t ratio = allocation->height / max_height;
|
int64_t ratio = allocation->height / max_height;
|
||||||
|
Loading…
Reference in New Issue
Block a user