Browse Source

Adjust UI a bit for logs tab, also I was wrong :P

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
137a3e6fe6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 62 additions and 21 deletions
  1. +57
    -16
      resources/ui/carla_host.ui
  2. +5
    -5
      source/frontend/carla_host.py

+ 57
- 16
resources/ui/carla_host.ui View File

@@ -67,16 +67,7 @@
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@@ -188,6 +179,21 @@
<string>Logs</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="QPlainTextEdit" name="text_logs">
<property name="font">
@@ -233,6 +239,15 @@
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<item>
<widget class="QPushButton" name="logs_save">
<property name="cursor">
@@ -256,8 +271,8 @@
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoDefault">
@@ -271,6 +286,19 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="logs_clear">
<property name="text">
@@ -282,8 +310,8 @@
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="shortcut">
@@ -291,6 +319,19 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="logs_autoscroll">
<property name="text">
@@ -422,7 +463,7 @@
<x>0</x>
<y>0</y>
<width>1045</width>
<height>42</height>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -964,7 +1005,7 @@
<property name="currentIndex">
<number>0</number>
</property>
<property name="tabBarAutoHide">
<property name="tabBarAutoHide" stdset="0">
<bool>false</bool>
</property>
<widget class="QWidget" name="tab_3">


+ 5
- 5
source/frontend/carla_host.py View File

@@ -2208,9 +2208,9 @@ class HostWindow(QMainWindow):
# --------------------------------------------------------------------------------------------------------
# Logs autoscroll, save and clear

@pyqtSlot(Qt.CheckState)
def slot_toggleLogAutoscroll(self, checked):
self.autoscrollOnNewLog = bool(checked)
@pyqtSlot(int)
def slot_toggleLogAutoscroll(self, checkState):
self.autoscrollOnNewLog = checkState == Qt.Checked
if self.autoscrollOnNewLog:
self.ui.text_logs.verticalScrollBar().setValue(self.ui.text_logs.verticalScrollBar().maximum())

@@ -2228,8 +2228,8 @@ class HostWindow(QMainWindow):

@pyqtSlot()
def slot_logSave(self):
filename, _ = QFileDialog.getSaveFileName(self, self.tr("Save Logs"),os.path.join(
self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], 'carla_log.txt'))
filename = os.path.join(self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], 'carla_log.txt')
filename, _ = QFileDialog.getSaveFileName(self, self.tr("Save Logs"), filename)

if not filename:
return


Loading…
Cancel
Save