[haiku-commits] Change in haiku[master]: Interface kit: don't immediately resize window when add/remove items.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 8 Mar 2020 06:11:17 +0000

From X512 <danger_mail@xxxxxxx>:

X512 has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2326 ;)


Change subject: Interface kit: don't immediately resize window when add/remove 
items.
......................................................................

Interface kit: don't immediately resize window when add/remove items.

It is causing artifacts in ProcessController during updating.

Change-Id: Iebf818cd15479fd21302a89283d846a6d231eeb1
---
M src/kits/interface/Menu.cpp
1 file changed, 1 insertion(+), 21 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/26/2326/1

diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp
index eafa643..61d5b53 100644
--- a/src/kits/interface/Menu.cpp
+++ b/src/kits/interface/Menu.cpp
@@ -727,14 +727,6 @@
                return false;

        InvalidateLayout();
-       if (LockLooper()) {
-               if (!Window()->IsHidden()) {
-                       _LayoutItems(index);
-                       _UpdateWindowViewSize(false);
-                       Invalidate();
-               }
-               UnlockLooper();
-       }

        return true;
 }
@@ -849,12 +841,6 @@
        }

        InvalidateLayout();
-       if (locked && Window() != NULL && !Window()->IsHidden()) {
-               // Make sure we update the layout if needed.
-               _LayoutItems(index);
-               _UpdateWindowViewSize(false);
-               Invalidate();
-       }

        if (locked)
                UnlockLooper();
@@ -2081,14 +2067,8 @@
                }
        }

-       if (invalidateLayout) {
+       if (invalidateLayout)
                InvalidateLayout();
-               if (locked && window != NULL) {
-                       _LayoutItems(0);
-                       _UpdateWindowViewSize(false);
-                       Invalidate();
-               }
-       }

        if (locked)
                UnlockLooper();

--
To view, visit https://review.haiku-os.org/c/haiku/+/2326
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Iebf818cd15479fd21302a89283d846a6d231eeb1
Gerrit-Change-Number: 2326
Gerrit-PatchSet: 1
Gerrit-Owner: X512 <danger_mail@xxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: Interface kit: don't immediately resize window when add/remove items. - Gerrit