Merge pull request #1868 from defnax/wire-ui-fixes

[TheWire] Fixing margins to not use to much wasted space
This commit is contained in:
csoler 2020-04-23 17:24:54 +02:00 committed by GitHub
commit b6e0b7aa48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 4 deletions

View File

@ -113,7 +113,7 @@ void WireGroupItem::setSelected(bool on)
// set color too // set color too
if (mSelected) if (mSelected)
{ {
setBackground("red"); setBackground(QColor (65, 159, 217));
} }
else else
{ {
@ -122,7 +122,7 @@ void WireGroupItem::setSelected(bool on)
} }
void WireGroupItem::setBackground(QString color) void WireGroupItem::setBackground(QColor color)
{ {
QWidget *tocolor = this; QWidget *tocolor = this;
QPalette p = tocolor->palette(); QPalette p = tocolor->palette();

View File

@ -62,7 +62,7 @@ protected:
private: private:
void setup(); void setup();
void setGroupSet(); void setGroupSet();
void setBackground(QString color); void setBackground(QColor color);
WireGroupHolder *mHolder; WireGroupHolder *mHolder;
RsWireGroup mGroup; RsWireGroup mGroup;

View File

@ -14,6 +14,18 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<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>0</number>
</property>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame">
<property name="frameShape"> <property name="frameShape">
@ -73,6 +85,10 @@
<property name="text"> <property name="text">
<string>\/</string> <string>\/</string>
</property> </property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -128,6 +144,8 @@
<header>gui/gxs/GxsIdLabel.h</header> <header>gui/gxs/GxsIdLabel.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources>
<include location="../icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -2139,3 +2139,7 @@ PostedCardView QFrame#mainFrame [new=false]{
PostedCardView > QFrame#mainFrame[new=true] { PostedCardView > QFrame#mainFrame[new=true] {
background-color: #005000; background-color: #005000;
} }
WireGroupItem QFrame#frame{
background: transparent;
}

View File

@ -1291,3 +1291,7 @@ PostedCardView QFrame#mainFrame [new=false]{
PostedCardView > QFrame#mainFrame[new=true] { PostedCardView > QFrame#mainFrame[new=true] {
background-color: #005000; background-color: #005000;
} }
WireGroupItem QFrame#frame{
background: transparent;
}