Fixed some minor GUI issues

* resizing for floating widgets
* vertical policies
* menus for views
* margins for keypad
* using property mainwindowframeless in style sheet
This commit is contained in:
Klaus Basan
2014-11-21 02:04:55 +01:00
committed by Roland Winklmeier
parent cd2c7c12a7
commit facbefeeea
13 changed files with 451 additions and 402 deletions

View File

@@ -191,7 +191,7 @@
<item row="4" column="1"> <item row="4" column="1">
<widget class="QProgressBar" name="prb_SetupAudioTestProgress"> <widget class="QProgressBar" name="prb_SetupAudioTestProgress">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>

View File

@@ -69,9 +69,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-77</y>
<width>373</width> <width>373</width>
<height>431</height> <height>447</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -113,70 +113,20 @@
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="9" column="1" colspan="2"> <item row="2" column="2">
<widget class="QLineEdit" name="le_PilotsName"> <widget class="QLabel" name="lbl_TakeOffTimePlanned">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLineEdit" name="le_AlternateAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="text"> <property name="text">
<string>ICAO</string> <string>6. Departure time</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_Callsign">
<property name="inputMask">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>40</number>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="QLineEdit" name="le_PilotsHomebase"/>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="le_CrusingAltitude">
<property name="maxLength">
<number>40</number>
</property>
</widget>
</item>
<item row="11" column="3">
<widget class="QPushButton" name="pb_Send">
<property name="text">
<string>Send plan</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="lbl_EstimatedTimeEnroute">
<property name="text">
<string>10. Estimated time enroute</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="12" column="2">
<widget class="QLabel" name="lbl_LastSent"> <widget class="QPushButton" name="pb_Load">
<property name="text"> <property name="text">
<string>Sent</string> <string>Load plan</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -190,40 +140,23 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item row="12" column="1">
<widget class="QLabel" name="lbl_TakeOffTimePlanned">
<property name="text">
<string>6. Departure time</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="2">
<widget class="QPushButton" name="pb_Load">
<property name="text">
<string>Load plan</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lbl_DestinationAirport">
<property name="text">
<string>9.Destination airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QPushButton" name="pb_Reset"> <widget class="QPushButton" name="pb_Reset">
<property name="text"> <property name="text">
<string>Reset plan</string> <string>Reset plan</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1">
<widget class="QLabel" name="lbl_EstimatedTimeEnroute">
<property name="text">
<string>10. Estimated time enroute</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0"> <item row="8" column="0">
<layout class="QGridLayout" name="gl_Remarks"> <layout class="QGridLayout" name="gl_Remarks">
<item row="0" column="0"> <item row="0" column="0">
@@ -256,6 +189,13 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="9" column="1" colspan="2">
<widget class="QLineEdit" name="le_PilotsName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="3"> <item row="6" column="3">
<widget class="QLabel" name="lbl_AlternateAirport"> <widget class="QLabel" name="lbl_AlternateAirport">
<property name="text"> <property name="text">
@@ -266,25 +206,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3"> <item row="12" column="3">
<widget class="QLabel" name="lbl_CrusingAltitude"> <widget class="QPushButton" name="pb_Send">
<property name="text"> <property name="text">
<string>7. Cruising altitude</string> <string>Send plan</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1" colspan="3"> <item row="3" column="3">
<widget class="QLineEdit" name="le_LastSent"> <widget class="QLineEdit" name="le_CrusingAltitude">
<property name="readOnly"> <property name="maxLength">
<bool>true</bool> <number>40</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="7" column="3">
<widget class="QLineEdit" name="le_DestinationAirport"> <widget class="QLineEdit" name="le_AlternateAirport">
<property name="inputMask"> <property name="inputMask">
<string>&gt;AAAA</string> <string>&gt;AAAA</string>
</property> </property>
@@ -293,18 +230,47 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="9" column="3">
<widget class="QLabel" name="lbl_PilotsNameAndHomebase"> <widget class="QLineEdit" name="le_PilotsHomebase"/>
<property name="text"> </item>
<string>14. Pilots name / homebase</string> <item row="1" column="1">
<widget class="QLineEdit" name="le_Callsign">
<property name="inputMask">
<string/>
</property> </property>
<property name="wordWrap"> <property name="text">
<string/>
</property>
<property name="maxLength">
<number>40</number>
</property>
<property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1" colspan="3"> <item row="0" column="0">
<widget class="QPlainTextEdit" name="pte_Remarks"> <widget class="QLabel" name="lbl_Type">
<property name="text">
<string>1. Type</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="le_TakeOffTimePlanned">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text">
<string>00:00</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4">
<widget class="QPlainTextEdit" name="pte_Route">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -317,48 +283,62 @@
<height>75</height> <height>75</height>
</size> </size>
</property> </property>
<property name="tabStopWidth"> </widget>
<number>1</number> </item>
<item row="4" column="0" colspan="4">
<widget class="QLabel" name="lbl_Route">
<property name="text">
<string>8. Route</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="2"> <item row="1" column="2">
<widget class="QLineEdit" name="le_FuelOnBoard"> <widget class="QLineEdit" name="le_AircraftType"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="le_OriginAirport">
<property name="inputMask"> <property name="inputMask">
<string>99:99</string> <string>&gt;AAAA</string>
</property> </property>
<property name="text"> <property name="text">
<string>00:00</string> <string>ICAO</string>
</property> </property>
<property name="maxLength"> <property name="maxLength">
<number>5</number> <number>4</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="12" column="0">
<widget class="QLabel" name="lbl_OriginAirport"> <widget class="QPushButton" name="pb_ValidateFlightPlan">
<property name="text"> <property name="text">
<string>5. Departure airport</string> <string>Validate</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="le_CruiseTrueAirspeed">
<property name="text">
<string>0 kts</string>
</property>
<property name="maxLength">
<number>40</number>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="lbl_FuelOnBorad">
<property name="text">
<string>12. Fuel on board</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="0" column="2">
<widget class="QLineEdit" name="le_EstimatedTimeEnroute"> <widget class="QLabel" name="lbl_Aircraft_Type">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text"> <property name="text">
<string>00:00</string> <string>3. Aircraft type</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbl_Callsign">
<property name="text">
<string>2. Callsign</string>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
@@ -368,13 +348,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0">
<widget class="QPushButton" name="pb_ValidateFlightPlan">
<property name="text">
<string>Validate</string>
</property>
</widget>
</item>
<item row="1" column="0" rowspan="3"> <item row="1" column="0" rowspan="3">
<widget class="QGroupBox" name="gb_Type"> <widget class="QGroupBox" name="gb_Type">
<property name="title"> <property name="title">
@@ -419,46 +392,27 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QLineEdit" name="le_OriginAirport"> <widget class="QLabel" name="lbl_OriginAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="text"> <property name="text">
<string>ICAO</string> <string>5. Departure airport</string>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="lbl_FuelOnBorad">
<property name="text">
<string>12. Fuel on board</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="10" column="0">
<widget class="QLineEdit" name="le_CruiseTrueAirspeed"> <widget class="QLabel" name="lbl_LastSent">
<property name="text"> <property name="text">
<string>0 kts</string> <string>Sent</string>
</property>
<property name="maxLength">
<number>40</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="0" column="1">
<widget class="QLineEdit" name="le_AircraftType"/> <widget class="QLabel" name="lbl_Callsign">
</item>
<item row="0" column="2">
<widget class="QLabel" name="lbl_Aircraft_Type">
<property name="text"> <property name="text">
<string>3. Aircraft type</string> <string>2. Callsign</string>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
@@ -468,35 +422,65 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="4"> <item row="9" column="0">
<widget class="QLabel" name="lbl_Route"> <widget class="QLabel" name="lbl_PilotsNameAndHomebase">
<property name="text"> <property name="text">
<string>8. Route</string> <string>14. Pilots name / homebase</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="2" column="3">
<widget class="QLineEdit" name="le_TakeOffTimePlanned"> <widget class="QLabel" name="lbl_CrusingAltitude">
<property name="text">
<string>7. Cruising altitude</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="le_EstimatedTimeEnroute">
<property name="inputMask"> <property name="inputMask">
<string>99:99</string> <string>99:99</string>
</property> </property>
<property name="text"> <property name="text">
<string>00:00</string> <string>00:00</string>
</property> </property>
<property name="maxLength"> </widget>
<number>5</number> </item>
<item row="10" column="1" colspan="3">
<widget class="QLineEdit" name="le_LastSent">
<property name="readOnly">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="7" column="0">
<widget class="QLabel" name="lbl_Type"> <widget class="QLineEdit" name="le_DestinationAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="text"> <property name="text">
<string>1. Type</string> <string>ICAO</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0" colspan="4"> <item row="6" column="0">
<widget class="QPlainTextEdit" name="pte_Route"> <widget class="QLabel" name="lbl_DestinationAirport">
<property name="text">
<string>9.Destination airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1" colspan="3">
<widget class="QPlainTextEdit" name="pte_Remarks">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -509,8 +493,40 @@
<height>75</height> <height>75</height>
</size> </size>
</property> </property>
<property name="tabStopWidth">
<number>1</number>
</property>
</widget> </widget>
</item> </item>
<item row="7" column="2">
<widget class="QLineEdit" name="le_FuelOnBoard">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text">
<string>00:00</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
<item row="11" column="0" colspan="4">
<spacer name="vs_ButtonDistance">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@@ -555,8 +571,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>373</width> <width>302</width>
<height>455</height> <height>468</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="vl_RemarksGeneratorScroll"> <layout class="QVBoxLayout" name="vl_RemarksGeneratorScroll">

View File

@@ -48,13 +48,13 @@
<enum>QLayout::SetDefaultConstraint</enum> <enum>QLayout::SetDefaultConstraint</enum>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>2</number> <number>0</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>

View File

@@ -67,7 +67,7 @@
<item> <item>
<widget class="BlackGui::CServerForm" name="frp_ServerForm"> <widget class="BlackGui::CServerForm" name="frp_ServerForm">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>

View File

@@ -142,6 +142,7 @@ namespace BlackGui
// for the first time resize // for the first time resize
if (!this->m_preferredSizeWhenFloating.isNull()) if (!this->m_preferredSizeWhenFloating.isNull())
{ {
this->m_initialDockedMinimumSize = this->minimumSize();
this->resize(this->m_preferredSizeWhenFloating); this->resize(this->m_preferredSizeWhenFloating);
} }
@@ -165,23 +166,22 @@ namespace BlackGui
} }
this->setNullTitleBar(); this->setNullTitleBar();
this->setContentsMargins(this->m_marginsWhenFloating); this->setContentsMargins(this->m_marginsWhenFloating);
if (!this->m_wasAlreadyFloating) if (!this->m_wasAlreadyFloating) { this->initialFloating(); }
{
this->initialFloating();
}
this->m_statusBar.show(); this->m_statusBar.show();
this->m_wasAlreadyFloating = true; this->m_wasAlreadyFloating = true;
} }
else else
{ {
if (!this->m_windowTitleWhenDocked) if (!this->m_windowTitleWhenDocked) { QDockWidget::setWindowTitle(""); }
{
QDockWidget::setWindowTitle("");
}
this->m_statusBar.hide(); this->m_statusBar.hide();
this->setEmptyTitleBar(); this->setEmptyTitleBar();
this->setContentsMargins(this->m_marginsWhenDocked); this->setContentsMargins(this->m_marginsWhenDocked);
// sometimes floating sets a new minimum size, here we reset it
if (this->minimumHeight() > this->m_initialDockedMinimumSize.height())
{
this->setMinimumSize(this->m_initialDockedMinimumSize);
}
} }
emit this->widgetTopLevelChanged(this, topLevel); emit this->widgetTopLevelChanged(this, topLevel);
} }

View File

@@ -148,6 +148,7 @@ namespace BlackGui
CManagedStatusBar m_statusBar; //!< Status bar when floating CManagedStatusBar m_statusBar; //!< Status bar when floating
QString m_windowTitleBackup; //!< original title, even if the widget title is deleted for layout purposes QString m_windowTitleBackup; //!< original title, even if the widget title is deleted for layout purposes
QSize m_preferredSizeWhenFloating; //!< preferred size when floating 1st time QSize m_preferredSizeWhenFloating; //!< preferred size when floating 1st time
QSize m_initialDockedMinimumSize; //!< minimum size before first floating
QPoint m_offsetWhenFloating; //!< initial offset to main window when floating first time QPoint m_offsetWhenFloating; //!< initial offset to main window when floating first time
bool m_allowStatusBar = true; bool m_allowStatusBar = true;
bool m_windowTitleWhenDocked = true; bool m_windowTitleWhenDocked = true;

View File

@@ -96,8 +96,10 @@ namespace BlackGui
QList<CEnableForDockWidgetInfoArea *> infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents(); QList<CEnableForDockWidgetInfoArea *> infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents();
foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets) foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets)
{ {
Q_ASSERT(dwia);
// KWB: potentially a risk when this object is deleted // KWB: potentially a risk when this object is deleted
// put under normal situations the child object will be deleted as well, and we have // but under normal situations the child object will be deleted as well, and we have
// no multi-threaded GUI // no multi-threaded GUI
dwia->setParentDockWidgetInfoArea(this); dwia->setParentDockWidgetInfoArea(this);
} }
@@ -109,6 +111,7 @@ namespace BlackGui
QList<CEnableForDockWidgetInfoArea *> widgetsWithDockWidgetInfoAreaComponent; QList<CEnableForDockWidgetInfoArea *> widgetsWithDockWidgetInfoAreaComponent;
foreach(QWidget * w, widgets) foreach(QWidget * w, widgets)
{ {
Q_ASSERT(w);
CEnableForDockWidgetInfoArea *dwc = dynamic_cast<Components::CEnableForDockWidgetInfoArea *>(w); CEnableForDockWidgetInfoArea *dwc = dynamic_cast<Components::CEnableForDockWidgetInfoArea *>(w);
if (dwc) if (dwc)
{ {

View File

@@ -53,11 +53,12 @@ QAbstractScrollArea #pg_StatusPageConsole { background-color: black; }
border: 0px; border: 0px;
} }
#wi_CentralWidgetOutside { #wi_CentralWidgetOutside[mainframeless="true"] {
background-image: url(:/textures/icons/textures/texture-outer.jpg); background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray; background-color: darkslategray;
margin: 0px; margin: 0px;
padding: 5px; border: 2px solid green;
border-radius: 20px;
} }
#fr_CentralFrameInside { #fr_CentralFrameInside {
@@ -84,6 +85,21 @@ QAbstractScrollArea #pg_StatusPageConsole { background-color: black; }
margin-right: 5px; margin-right: 5px;
} }
/** close button with frameless windows **/
#pb_FramelessCloseButton {
background: transparent;
padding: 0px 10px 0px 0px;
margin: 0px;
}
/** for FontDialog etc. **/
#comp_Settings QToolButton {
background-color: rgba(0, 0, 255, 128);
border-style: none;
border-radius:3px;
color: yellow;
}
#wi_MainKeypadArea QPushButton { #wi_MainKeypadArea QPushButton {
/** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/ /** background-image: url(:/textures/icons/textures/texture-inner.jpg); **/
/** need to fix pressed button first **/ /** need to fix pressed button first **/
@@ -281,9 +297,16 @@ QSpinBox {
background: transparent; background: transparent;
} }
QColorDialog {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
}
QMenuBar { QMenuBar {
background-image: url(:/textures/icons/textures/texture-outer.jpg); background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray; background-color: darkslategray;
padding: 0px 0px 0px 10px;
margin: 0px 0px 20px 0px; /** removes overlapping bar in frameless mode, why bottom margin helps here, no idea, bug? **/
} }
QMenuBar::item { QMenuBar::item {
@@ -317,14 +340,14 @@ QScrollBar:horizontal {
border: 2px solid gray; border: 2px solid gray;
background: slategray; background: slategray;
height: 10px; height: 10px;
margin: 0px 5px 0 5px; margin: 0px 5px 0px 5px;
} }
QScrollBar:vertical { QScrollBar:vertical {
border: 2px solid gray; border: 2px solid gray;
background: slategray; background: slategray;
width: 10px; width: 10px;
margin: 5px 0 5px 0; margin: 5px 0px 5px 0;
} }
QScrollBar::handle:horizontal { QScrollBar::handle:horizontal {
@@ -406,6 +429,7 @@ QSlider::handle:horizontal {
QSizeGrip { QSizeGrip {
image: url(:/diagona/icons/diagona/icons/arrow-in-out.png); image: url(:/diagona/icons/diagona/icons/arrow-in-out.png);
padding: 0px 20px 0px 0px;
width: 16px; width: 16px;
height: 16px; height: 16px;
} }

View File

@@ -27,6 +27,8 @@ namespace BlackGui
{ {
Q_ASSERT(this->m_model); Q_ASSERT(this->m_model);
this->m_model->setStationMode(stationMode); this->m_model->setStationMode(stationMode);
this->m_withMenuItemClear = true;
this->m_withMenuItemRefresh = true;
switch (stationMode) switch (stationMode)
{ {

View File

@@ -23,6 +23,7 @@ namespace BlackGui
*/ */
CStatusMessageView::CStatusMessageView(QWidget *parent) : CViewBase(parent) CStatusMessageView::CStatusMessageView(QWidget *parent) : CViewBase(parent)
{ {
m_withMenuItemClear = true;
this->standardInit(new CStatusMessageListModel(this)); this->standardInit(new CStatusMessageListModel(this));
} }

View File

@@ -49,9 +49,9 @@ namespace BlackGui
void CViewBaseNonTemplate::customMenu(QMenu &menu) const void CViewBaseNonTemplate::customMenu(QMenu &menu) const
{ {
menu.addAction(BlackMisc::CIcons::refresh16(), "Update", this, SIGNAL(requestUpdate())); if (this->m_withMenuItemRefresh) { menu.addAction(BlackMisc::CIcons::refresh16(), "Update", this, SIGNAL(requestUpdate())); }
menu.addAction(BlackMisc::CIcons::delete16(), "Clear", this, SLOT(ps_clear())); if (this->m_withMenuItemClear) { menu.addAction(BlackMisc::CIcons::delete16(), "Clear", this, SLOT(ps_clear())); }
menu.addSeparator(); if (!menu.isEmpty()) { menu.addSeparator(); }
menu.addAction(BlackMisc::CIcons::resize16(), "Full resize", this, SLOT(fullResizeToContents())); menu.addAction(BlackMisc::CIcons::resize16(), "Full resize", this, SLOT(fullResizeToContents()));
// resize to content might decrease performance, // resize to content might decrease performance,

View File

@@ -117,6 +117,8 @@ namespace BlackGui
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count) int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again
bool m_withMenuItemClear = false;
bool m_withMenuItemRefresh = false;
protected slots: protected slots:
//! Helper method with template free signature serving as callback from threaded worker //! Helper method with template free signature serving as callback from threaded worker

View File

@@ -90,7 +90,7 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gl_CentralFrameInside">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>