summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/panels/panel.c19
2 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 719b2fe..d9e5efd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
12-11-25 Cyrille Bagard <nocbos@gmail.com>
+ * src/gui/panels/panel.c:
+ Ensure that automatic resizing fits well for small screen resolutions.
+
+12-11-25 Cyrille Bagard <nocbos@gmail.com>
+
* plugins/androhelpers/try_n_catch.c:
* src/analysis/disass/links.c:
* src/arch/dalvik/decomp/const.c:
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)
{