diff -r c104c120e043 -r 0a51887c13cd WebBrowser/UrlBar/FavIconLabel.py --- a/WebBrowser/UrlBar/FavIconLabel.py Fri Feb 01 20:15:03 2019 +0100 +++ b/WebBrowser/UrlBar/FavIconLabel.py Sun Feb 03 16:10:39 2019 +0100 @@ -75,6 +75,16 @@ self.__dragStartPos = evt.pos() super(FavIconLabel, self).mousePressEvent(evt) + def mouseReleaseEvent(self, evt): + """ + Protected method to handle mouse release events. + + @param evt reference to the mouse event (QMouseEvent) + """ + if evt.button() == Qt.LeftButton: + self.__showPopup(evt.globalPos()) + super(FavIconLabel, self).mouseReleaseEvent(evt) + def mouseMoveEvent(self, evt): """ Protected method to handle mouse move events. @@ -97,3 +107,20 @@ drag.setPixmap(p) drag.setMimeData(mimeData) drag.exec_() + + def __showPopup(self, pos): + """ + Private method to show the site info popup. + + @param pos position the popup should be shown at + @type QPoint + """ + if self.__browser is None: + return + + url = self.__browser.url() + if url.isValid() and url.scheme() not in [ + "eric", "about", "data", "chrome"]: + from ..SiteInfo.SiteInfoWidget import SiteInfoWidget + info = SiteInfoWidget(self.__browser, self) + info.showAt(pos)