Yuya Nishihara committed 399eb54

infobar: place infobar right below filterbar to make it usable

Overlaying infobar on top makes filterbar unusable while infobar is visible.
It's really bad for push confirmation.

To update geometry accordingly, it uses LayoutRequest event:

  • Participants
  • Parent commits 8937b9e

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

         if not self._activeInfoBar:
         w = self._activeInfoBar
-        w.setGeometry(0, 0, self.width(), w.heightForWidth(self.width()))
+        top = self.repoview.mapTo(self, QPoint(0, 0)).y()
+        w.setGeometry(0, top, self.width(), w.heightForWidth(self.width()))
         # give margin; first row should be visible without closing confirmation
         if w.infobartype >= qtlib.InfoBar.CONFIRM:
             h = self.repoview.horizontalHeader()
-            y = h.mapTo(self, h.pos()).y()
+            y = h.mapTo(self.repoview, QPoint(0, 0)).y()
             h.setMinimumSize(0, max(w.height() - y, 0))
         QWidget.resizeEvent(self, event)
+    def event(self, event):
+        if event.type() == QEvent.LayoutRequest:
+            self._updateInfoBarGeometry()
+        return QWidget.event(self, event)
     def createActions(self):
         QShortcut(QKeySequence('CTRL+P'), self, self.gotoParent)