refact ui 1

This commit is contained in:
2026-01-15 16:24:52 +03:00
parent 2ab2e47850
commit 4e2c6bb81e
3 changed files with 33 additions and 36 deletions

View File

@@ -109,6 +109,10 @@ QToolButton#btnViewPassword, QToolButton#btnChangePassword {
height: 18px; height: 18px;
} }
QPushButton#createDuplicateButton, QPushButton#deleteVersionButton, QPushButton#switchServerVersionButton {
width: 130px;
}
QPushButton:flat, QToolButton:flat { QPushButton:flat, QToolButton:flat {
border: none; /* no border for a flat push button */ border: none; /* no border for a flat push button */
} }

View File

@@ -23,7 +23,7 @@ DialogVersionControl::DialogVersionControl(ConnectorToServer* connectorToServer,
ui->deleteVersionButton->setObjectName("deleteVersionButton"); ui->deleteVersionButton->setObjectName("deleteVersionButton");
ui->switchServerVersionButton->setObjectName("switchServerVersionButton"); ui->switchServerVersionButton->setObjectName("switchServerVersionButton");
setMinimumSize(500, 300); setMinimumSize(600, 300);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Version control")); setWindowTitle(tr("Version control"));
@@ -169,8 +169,11 @@ void DialogVersionControl::on_deleteVersionButton_clicked()
return; return;
} }
if(SpecMsgBox::WarningYesNo(this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
{
emit sigSendDeleteVersion(selectedVersion); emit sigSendDeleteVersion(selectedVersion);
} }
}
void DialogVersionControl::on_switchServerVersionButton_clicked() void DialogVersionControl::on_switchServerVersionButton_clicked()
{ {

View File

@@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>580</width> <width>600</width>
<height>277</height> <height>277</height>
</rect> </rect>
</property> </property>
@@ -16,6 +16,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
@@ -63,7 +69,7 @@
<enum>Qt::PreventContextMenu</enum> <enum>Qt::PreventContextMenu</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Available versions on the server:</string> <string>Available versions on the server</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -86,39 +92,6 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="infoViewTitle">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Info:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="infoValue">
<property name="text">
<string>InfoValue</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="ServerInfoLayout"> <layout class="QHBoxLayout" name="ServerInfoLayout">
<item> <item>
@@ -145,6 +118,23 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="infoValue">
<property name="text">
<string>InfoValue</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</item> </item>
<item> <item>