mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
ui, pop-ups: set details scrollbar position correctly
When adding the details of a connection, the scrollbar was always at the bottom of the view.
This commit is contained in:
parent
2f04d0f27f
commit
ffd70836f6
1 changed files with 1 additions and 4 deletions
|
@ -268,10 +268,6 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
|||
@QtCore.pyqtSlot()
|
||||
def on_connection_prompt_triggered(self):
|
||||
self.stackedWidget.setCurrentIndex(1)
|
||||
# FIXME: scrolling to the top in _render_details doesn't seem to work,
|
||||
# so do it here until we figure out why.
|
||||
xpos = self.connDetails.verticalScrollBar().minimum()
|
||||
self.connDetails.verticalScrollBar().setValue(xpos)
|
||||
self._render_connection(self._con)
|
||||
if self._tick > 0:
|
||||
self.show()
|
||||
|
@ -504,6 +500,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
|||
|
||||
self.connDetails.document().clear()
|
||||
self.connDetails.document().setHtml(details)
|
||||
self.connDetails.moveCursor(QtGui.QTextCursor.Start)
|
||||
|
||||
# https://gis.stackexchange.com/questions/86398/how-to-disable-the-escape-key-for-a-dialog
|
||||
def keyPressEvent(self, event):
|
||||
|
|
Loading…
Add table
Reference in a new issue