diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/panels/panel.c | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c index 5718567..2749545 100644 --- a/src/gui/panels/panel.c +++ b/src/gui/panels/panel.c @@ -96,6 +96,9 @@ static void rebuild_panels_interface(const panel_node *);  /* Part réservée aux parties principales (en %) */  #define MAIN_PART_PERCENT 70 +/* Part minimale des petits composants (en %) */ +#define MIN_PART_PERCENT 20 +  /* Met à jour l'affichage suite à un changement hiérarchique. */  static void auto_resize_panels(GtkWidget *, GdkRectangle *, gpointer); @@ -976,6 +979,22 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi       * Calcul des valeurs applicables et mise en application.       */ +    /* Correctifs éventuels pour les petits composants */ +    if (node->first == main_node) +    { +        if (GTK_IS_HPANED(node->paned)) +            second_req.width = MAX(second_req.width, (space->width * MIN_PART_PERCENT) / 100); +        else +            second_req.height = MAX(second_req.height, (space->height * MIN_PART_PERCENT) / 100); +    } +    else if (node->second == main_node) +    { +        if (GTK_IS_HPANED(node->paned)) +            first_req.width = MAX(first_req.width, (space->width * MIN_PART_PERCENT) / 100); +        else +            first_req.height = MAX(first_req.height, (space->height * MIN_PART_PERCENT) / 100); +    } +      /* Une partie principale arrive en premier */      if (!can_lower && can_upper)      {  | 
