Fix bitview in Signal Editor on MacOS
MacOS didn't scale the bitfield widget quite the way it was supposed to. The layout has been redesigned to prevent this issue.
This commit is contained in:
@@ -470,7 +470,7 @@ void DBCSignalEditor::fillSignalForm(DBC_SIGNAL *sig)
|
|||||||
inhibitMsgProc = true;
|
inhibitMsgProc = true;
|
||||||
|
|
||||||
if (sig == nullptr) {
|
if (sig == nullptr) {
|
||||||
ui->groupBox->setEnabled(false);
|
//ui->groupBox->setEnabled(false);
|
||||||
ui->txtName->setText("");
|
ui->txtName->setText("");
|
||||||
ui->txtBias->setText("");
|
ui->txtBias->setText("");
|
||||||
ui->txtBitLength->setText("");
|
ui->txtBitLength->setText("");
|
||||||
@@ -491,7 +491,7 @@ void DBCSignalEditor::fillSignalForm(DBC_SIGNAL *sig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* we have a signal */
|
/* we have a signal */
|
||||||
ui->groupBox->setEnabled(true);
|
//ui->groupBox->setEnabled(true);
|
||||||
|
|
||||||
ui->txtName->setText(sig->name);
|
ui->txtName->setText(sig->name);
|
||||||
ui->txtBias->setText(QString::number(sig->bias));
|
ui->txtBias->setText(QString::number(sig->bias));
|
||||||
|
|||||||
+32
-41
@@ -17,46 +17,38 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="2,1">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="2,1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="title">
|
<item>
|
||||||
<string>Signal Parameters</string>
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
</property>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<widget class="QLabel" name="label">
|
||||||
<item row="0" column="0">
|
<property name="text">
|
||||||
<widget class="QLabel" name="label">
|
<string>Name:</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Name:</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLineEdit" name="txtName"/>
|
||||||
<item row="0" column="1">
|
</item>
|
||||||
<widget class="QLineEdit" name="txtName"/>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="CANDataGrid" name="bitfield" native="true">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string>Start Bit:</string>
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
</property>
|
<horstretch>0</horstretch>
|
||||||
</widget>
|
<verstretch>0</verstretch>
|
||||||
</item>
|
</sizepolicy>
|
||||||
<item row="1" column="1">
|
</property>
|
||||||
<widget class="CANDataGrid" name="bitfield" native="true">
|
<property name="minimumSize">
|
||||||
<property name="sizePolicy">
|
<size>
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<width>300</width>
|
||||||
<horstretch>0</horstretch>
|
<height>300</height>
|
||||||
<verstretch>0</verstretch>
|
</size>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="minimumSize">
|
</item>
|
||||||
<size>
|
</layout>
|
||||||
<width>300</width>
|
|
||||||
<height>300</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
@@ -258,7 +250,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>txtName</tabstop>
|
|
||||||
<tabstop>txtBitLength</tabstop>
|
<tabstop>txtBitLength</tabstop>
|
||||||
<tabstop>cbIntelFormat</tabstop>
|
<tabstop>cbIntelFormat</tabstop>
|
||||||
<tabstop>comboType</tabstop>
|
<tabstop>comboType</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user