Skip to content

Commit

Permalink
Fix style in Windows (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Jan 24, 2021
1 parent 2830b68 commit e561f9c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 25 deletions.
41 changes: 28 additions & 13 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
<height>20</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>File</string>
</property>
Expand Down Expand Up @@ -440,6 +445,11 @@
<height>20</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Streaming</string>
</property>
Expand Down Expand Up @@ -533,11 +543,11 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>11</pointsize>
</font>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the streaming plugin.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
Expand Down Expand Up @@ -620,9 +630,7 @@
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>11</pointsize>
<stylestrategy>PreferAntialias</stylestrategy>
<pointsize>9</pointsize>
</font>
</property>
<property name="focusPolicy">
Expand Down Expand Up @@ -821,6 +829,11 @@
</property>
<item>
<widget class="QLabel" name="label_8">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Publishers</string>
</property>
Expand Down Expand Up @@ -1311,7 +1324,7 @@
<string>tt</string>
</property>
<property name="icon">
<iconset>
<iconset resource="resource.qrc">
<normaloff>:/style_light/line_tracker_1.png</normaloff>:/style_light/line_tracker_1.png</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -1736,7 +1749,7 @@
<x>0</x>
<y>0</y>
<width>1248</width>
<height>25</height>
<height>26</height>
</rect>
</property>
<property name="minimumSize">
Expand Down Expand Up @@ -1810,7 +1823,7 @@
</action>
<action name="actionReportBug">
<property name="icon">
<iconset>
<iconset resource="resource.qrc">
<normaloff>:/resources/github.png</normaloff>:/resources/github.png</iconset>
</property>
<property name="text">
Expand Down Expand Up @@ -1871,7 +1884,7 @@
</action>
<action name="actionShare_the_love">
<property name="icon">
<iconset>
<iconset resource="resource.qrc">
<normaloff>:/resources/twitter.png</normaloff>:/resources/twitter.png</iconset>
</property>
<property name="text">
Expand All @@ -1897,6 +1910,8 @@
<header location="global">menubar.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="resource.qrc"/>
</resources>
<connections/>
</ui>
9 changes: 5 additions & 4 deletions src/resources/stylesheet_dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ item_selection_background: #148CD2
//------- PALETTE END --------

QWidget {
background-color: transparent;
background: transparent;
border: 0px solid ${border_default};
padding: 0px;
color: ${default_text};
font-size: 10pt;
}


Expand All @@ -33,7 +34,7 @@ QWidget:disabled{
}

PlotWidget {
background: ${main_background};
background: ${widget_background};
border: 0px solid white;
}

Expand Down Expand Up @@ -266,11 +267,11 @@ QMenu::icon {
}

QMenu::item {
background-color: transparent;
background: ${widget_background};
padding: 2px 25px 2px 25px;
color: ${default_text};
border: 1px solid transparent;
margin: 2px;
margin: 0px;
margin-left: 0px;
margin-right: 0px;
}
Expand Down
16 changes: 9 additions & 7 deletions src/resources/stylesheet_light.qss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ disabled_text: #666666

widget_background_disabled: #eeeeee;

border_default: grey
border_default: #333333
border_hover: #62c5ff
border_checked: #1177ff

Expand All @@ -20,10 +20,11 @@ item_selection_background: #62c5ff
//------- PALETTE END --------

QWidget {
background-color: transparent;
background: transparent;
border: 0px solid ${border_default};
padding: 0px;
color: ${default_text};
font-size: 10pt;
}


Expand All @@ -33,7 +34,7 @@ QWidget:disabled{
}

PlotWidget {
background: ${main_background};
background: ${widget_background};
border: 0px solid white;
}

Expand Down Expand Up @@ -121,6 +122,7 @@ QToolTip {
background: ${widget_background};
color: ${default_text}; }


/* QScrollArea ------------------------------------------------------------

--------------------------------------------------------------------------- */
Expand Down Expand Up @@ -262,7 +264,7 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
/* QMenu ----------------------------------------------------------- */

QMenu {
background-color: ${widget_background};
background: ${widget_background};
border: 1px solid ${border_default};
}

Expand All @@ -271,11 +273,11 @@ QMenu::icon {
}

QMenu::item {
background-color: transparent;
background: ${widget_background};
padding: 2px 25px 2px 25px;
color: ${default_text};
border: 1px solid transparent;
margin: 2px;
margin: 0px;
margin-left: 0px;
margin-right: 0px;
}
Expand Down Expand Up @@ -567,7 +569,6 @@ QComboBox {
}



/* QSlider ---------------------------------------------------------------- */

QSlider:disabled {
Expand Down Expand Up @@ -756,6 +757,7 @@ QWidget#leftMainWindowFrame
background-color: ${main_background};
}


QWidget#widgetLabelLoad,
QWidget#widgetLabelStreaming,
QWidget#widgetLabelPublishers,
Expand Down
4 changes: 3 additions & 1 deletion src/stylesheet.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ inline QString SetApplicationStyleSheet(QString style)
auto parts = lines[i].split(":");
if( parts.size() == 2 )
{
palette.insert( {parts[0].remove(" "), parts[1].remove(" ")} );
QString value = parts[1].remove(" ");
value.remove("\r");
palette.insert( {parts[0].remove(" ") ,value } );
}

if( lines[i++].contains("PALETTE END") )
Expand Down

0 comments on commit e561f9c

Please sign in to comment.