Browse Source

Changed backgrounds resolution & test changes for rusification widget and alternative version in help widget

Ivan Arkhipov 5 years ago
parent
commit
b5b16ea04e
7 changed files with 790 additions and 33 deletions
  1. 3 3
      Legacy_v2.pro
  2. 8 0
      common.qrc
  3. 745 10
      gui/helpwidget.ui
  4. 9 5
      gui/mainwindow.cpp
  5. 5 0
      gui/mainwindow.h
  6. 10 14
      gui/rusificationwidget.cpp
  7. 10 1
      gui/rusificationwidget.ui

+ 3 - 3
Legacy_v2.pro

@@ -111,9 +111,9 @@ FORMS += \
     gui/newswidget.ui \
     gui/helpwidget.ui
 
-#RESOURCES += \
-#    backgrounds.qrc \
-#    common.qrc
+RESOURCES += \
+    backgrounds.qrc \
+    common.qrc
 
 win32:RC_ICONS = $$PWD/assets/appicon.ico
 

+ 8 - 0
common.qrc

@@ -21,5 +21,13 @@
         <file>assets/appicon.ico</file>
         <file>assets/teksty-photo-normal.png</file>
         <file>assets/fonts/title.TTF</file>
+        <file>assets/buttons/white_btn.png</file>
+        <file>assets/buttons/white_btn_pressed.png</file>
+        <file>assets/buttons/gray_btn.png</file>
+        <file>assets/patch_icons/karty-photo-small.png</file>
+        <file>assets/patch_icons/shrifty-photo-small.png</file>
+        <file>assets/patch_icons/teksty-photo-small.png</file>
+        <file>assets/patch_icons/zagruzochnye-ekrany-photo-small.png</file>
+        <file>assets/patch_icons/zvuki-photo-small.png</file>
     </qresource>
 </RCC>

+ 745 - 10
gui/helpwidget.ui

@@ -15,22 +15,757 @@
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
-    <widget class="QLabel" name="label_supertitle">
-     <property name="font">
-      <font>
-       <family>Arial</family>
-       <pointsize>18</pointsize>
-      </font>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
      </property>
      <property name="styleSheet">
-      <string notr="true">color: white;</string>
+      <string notr="true">QScrollArea{
+	background: transparent;
+}
+
+QScrollArea &gt; QWidget &gt; QWidget { background: transparent; }
+
+QScrollBar:vertical {
+     border: 0px solid grey;
+     background: transparent;
+     width: 10px;
+     margin: 22px 0 22px 0;
+ }
+
+ QScrollBar::handle:vertical {
+	background-color: rgba(129, 129, 129, 150);	
+    min-height: 10px;
+	border-radius: 5px;
+ }
+ QScrollBar::add-line:vertical {
+     border: 0px solid grey;
+     background: transparent;
+     height: 1px;
+     subcontrol-position: bottom;
+     subcontrol-origin: margin;
+ }
+
+ QScrollBar::sub-line:vertical {
+     border: 0px solid grey;
+     background: transparent;
+     height: 1px;
+     subcontrol-position: top;
+     subcontrol-origin: margin;
+ }
+ QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
+     border: 0px;
+     width: 3px;
+     height: 3px;
+     background: transparent;
+ }
+
+ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
+     background: none;
+ }</string>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::NoFrame</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Plain</enum>
+     </property>
+     <property name="lineWidth">
+      <number>0</number>
+     </property>
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOff</enum>
+     </property>
+     <property name="sizeAdjustPolicy">
+      <enum>QAbstractScrollArea::AdjustIgnored</enum>
      </property>
-     <property name="text">
-      <string>Окно &quot;Помощь&quot;</string>
+     <property name="widgetResizable">
+      <bool>true</bool>
      </property>
      <property name="alignment">
-      <set>Qt::AlignCenter</set>
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
      </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>608</width>
+        <height>589</height>
+       </rect>
+      </property>
+      <property name="autoFillBackground">
+       <bool>false</bool>
+      </property>
+      <layout class="QGridLayout" name="news_layout">
+       <property name="leftMargin">
+        <number>11</number>
+       </property>
+       <property name="topMargin">
+        <number>11</number>
+       </property>
+       <property name="rightMargin">
+        <number>11</number>
+       </property>
+       <property name="bottomMargin">
+        <number>11</number>
+       </property>
+       <property name="spacing">
+        <number>7</number>
+       </property>
+       <item row="5" column="0">
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="0">
+        <widget class="QWidget" name="backup_status_8" native="true">
+         <property name="styleSheet">
+          <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_7">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_4_title_3">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+              <pointsize>8</pointsize>
+              <weight>50</weight>
+              <bold>false</bold>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: #cfa644;  background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Основные тексты:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLabel" name="label_5_common_6">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>a_AlgeriusNr</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"> background-color:none;
+color: rgb(255, 255, 127);</string>
+            </property>
+            <property name="text">
+             <string>Скачивается: 56%</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2">
+           <widget class="QPushButton" name="pushButton_3">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">QPushButton {
+	background-image: url(:/assets/buttons/gray_btn.png);
+	color: black;
+	border-radius: 5px;
+	border: 1px solid black;
+}
+ 
+QPushButton:pressed {
+	border: 2px solid black;
+}</string>
+            </property>
+            <property name="text">
+             <string>Выключить</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" colspan="3">
+           <widget class="QLabel" name="label_common_14">
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
+            </property>
+            <property name="text">
+             <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <property name="indent">
+             <number>0</number>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="3" column="0">
+        <widget class="QWidget" name="backup_status_14" native="true">
+         <property name="styleSheet">
+          <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_8">
+          <item row="0" column="2">
+           <widget class="QPushButton" name="pushButton_6">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">QPushButton {
+	background-image: url(:/assets/buttons/gray_btn.png);
+	color: black;
+	border-radius: 5px;
+	border: 1px solid black;
+}
+ 
+QPushButton:pressed {
+	border: 2px solid black;
+}</string>
+            </property>
+            <property name="text">
+             <string>Выключить</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLabel" name="label_5_common_15">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>a_AlgeriusNr</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"> background-color:none;
+color: rgb(255, 255, 127);</string>
+            </property>
+            <property name="text">
+             <string>В очереди</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_4_title_6">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+              <pointsize>8</pointsize>
+              <weight>50</weight>
+              <bold>false</bold>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: #cfa644;  background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Названия предметов:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" colspan="3">
+           <widget class="QLabel" name="label_common_15">
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
+            </property>
+            <property name="text">
+             <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <property name="indent">
+             <number>0</number>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="4" column="0">
+        <widget class="QWidget" name="backup_status_15" native="true">
+         <property name="styleSheet">
+          <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_9">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_4_title_7">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+              <pointsize>8</pointsize>
+              <weight>50</weight>
+              <bold>false</bold>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: #cfa644;  background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Названия эмоций:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLabel" name="label_5_title_16">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>a_AlgeriusNr</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"> background-color:none;
+color: rgb(255, 255, 127);</string>
+            </property>
+            <property name="text">
+             <string>В очереди</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2">
+           <widget class="QPushButton" name="pushButton_7">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">QPushButton {
+	color: black;
+    border: 2px solid #8f8f91;
+    border-radius: 6px;
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
+    min-width: 80px;
+}
+ 
+QPushButton:pressed {
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
+}
+ 
+QPushButton:flat {
+    border: none; /* no border for a flat push button */
+}
+ 
+QPushButton:default {
+    border-color: navy; /* make the default button prominent */
+}</string>
+            </property>
+            <property name="text">
+             <string>Выключить</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" colspan="3">
+           <widget class="QLabel" name="label_common_10">
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
+            </property>
+            <property name="text">
+             <string>Краткое описание бла-бла-бла</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <property name="indent">
+             <number>0</number>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QWidget" name="backup_status_16" native="true">
+         <property name="styleSheet">
+          <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_13">
+          <item row="0" column="2">
+           <widget class="QLabel" name="label_5_common_18">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>a_AlgeriusNr</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"> background-color:none;
+color: rgb(255, 0, 0);</string>
+            </property>
+            <property name="text">
+             <string>Выключен</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="3">
+           <widget class="QPushButton" name="pushButton_9">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">QPushButton {
+	background-image: url(:/assets/buttons/gray_btn.png);
+	color: black;
+	border-radius: 5px;
+	border: 1px solid black;
+}
+ 
+QPushButton:pressed {
+	border: 2px solid black;
+}</string>
+            </property>
+            <property name="text">
+             <string>Включить</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLabel" name="label_4_title_9">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+              <pointsize>8</pointsize>
+              <weight>50</weight>
+              <bold>false</bold>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: #cfa644;  background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Шрифты (старая версия):</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1" colspan="3">
+           <widget class="QLabel" name="label_common_13">
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
+            </property>
+            <property name="text">
+             <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <property name="indent">
+             <number>0</number>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0" rowspan="2">
+           <widget class="QLabel" name="label_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>64</width>
+              <height>64</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>64</width>
+              <height>64</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border-image: url(:/assets/patch_icons/shrifty-photo-small.png);
+background: transparent; border-radius: 0px;</string>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="0" column="0">
+        <widget class="QWidget" name="backup_status_3" native="true">
+         <property name="styleSheet">
+          <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_2">
+          <item row="0" column="1">
+           <widget class="QLabel" name="label_4_title">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+              <pointsize>8</pointsize>
+              <weight>50</weight>
+              <bold>false</bold>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: #cfa644;  background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Шрифты:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2">
+           <widget class="QLabel" name="label_5_common">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>a_AlgeriusNr</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(0, 170, 0); background-color:none;</string>
+            </property>
+            <property name="text">
+             <string>Включен</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="3">
+           <widget class="QPushButton" name="pushButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">QPushButton {
+	background-image: url(:/assets/buttons/gray_btn.png);
+	color: black;
+	border-radius: 5px;
+	border: 1px solid black;
+}
+ 
+QPushButton:pressed {
+	border: 2px solid black;
+}</string>
+            </property>
+            <property name="text">
+             <string>Выключить</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="1" colspan="3">
+           <widget class="QLabel" name="label_common_4">
+            <property name="font">
+             <font>
+              <family>Trajan Pro 3</family>
+             </font>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
+            </property>
+            <property name="text">
+             <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <property name="indent">
+             <number>0</number>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0" rowspan="4">
+           <widget class="QLabel" name="label">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>64</width>
+              <height>64</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>64</width>
+              <height>64</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border-image: url(:/assets/patch_icons/shrifty-photo-small.png);
+background: transparent; border-radius: 0px;</string>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
   </layout>

+ 9 - 5
gui/mainwindow.cpp

@@ -40,13 +40,16 @@ void MainWindow::Init() {
     status_frame->show();
 
     changeFontSizeRecursive(100, this);
-    updateGeometry();
 
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
-    background = new QPixmap(":/assets/backgrounds/bg" + QString::number(qrand() % MAX_PIXMAP_ID + 1) + ".png");
+    background = new QPixmap();
+    background->load(":/assets/backgrounds/bg" + QString::number(qrand() % MAX_PIXMAP_ID + 1) + ".png");
     setupWindowBackgroundAndMask();
     setupMenuHoverWidget();
 
+    updateGeometry();
+    repaint();
+
     background_update_timer.setInterval(30 * 1000);
     connect(&background_update_timer, &QTimer::timeout, this, &MainWindow::randomChangeBackground);
     background_update_timer.start();
@@ -173,11 +176,12 @@ void MainWindow::onHoverMenuentry()
 
 void MainWindow::setupWindowBackgroundAndMask()
 {
-    QPixmap maskPix = background->scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
-    setMask(maskPix.mask());
+    current_bg = background->scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+    current_mask = current_bg.mask();
+    setMask(current_mask);
 
     QPalette palette;
-    palette.setBrush(QPalette::Window, maskPix);
+    palette.setBrush(QPalette::Window, current_bg);
     setPalette(palette);
 }
 

+ 5 - 0
gui/mainwindow.h

@@ -5,6 +5,7 @@
 #include <QPropertyAnimation>
 #include <QTimer>
 #include <QPixmap>
+#include <QBitmap>
 
 #include "statuswidget.h"
 #include "rusificationwidget.h"
@@ -87,6 +88,10 @@ private:
 
     QPixmap *background;
     QPixmap *next_pixmap {nullptr};
+
+    QPixmap current_bg;
+    QBitmap current_mask;
+
     QTimer background_update_timer;
     QTimer fade_animation_timer;
     double next_pixmap_opacity;

+ 10 - 14
gui/rusificationwidget.cpp

@@ -10,12 +10,12 @@ void doStuffWithEveryItemInMyTree( QTreeWidgetItem *item )
         doStuffWithEveryItemInMyTree( item->child(i) );
 }
 
-RusificationTreeItem* findItemByName(RusificationTreeItem* item, QString name) {
-    if (item->name == name)
-        return item;
-
+QTreeWidgetItem* findItemByName(QTreeWidgetItem* item, QString name) {
     for (int i = 0; i < item->childCount(); i++) {
-        RusificationTreeItem* found_item = findItemByName((RusificationTreeItem*)item->child(i), name);
+        if (((RusificationTreeItem*)item->child(i))->name == name)
+            return item->child(i);
+
+        QTreeWidgetItem* found_item = findItemByName(item->child(i), name);
         if (found_item)
             return found_item;
     }
@@ -51,20 +51,16 @@ void RusificationWidget::setupTreeWidget()
     patch_list.setIniCodec("UTF-8");
     ui->treeWidget_title->setMouseTracking(true);
 
-    RusificationTreeItem *root_item = new RusificationTreeItem("rusification");
-    root_item->title = "Русификация";
-    root_item->setText(0, "Русификация");
-    root_item->description = "Русификация (описание)";
-    root_item->setFlags(Qt::ItemIsAutoTristate | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
-    ui->treeWidget_title->invisibleRootItem()->addChild(root_item);
-
     foreach (const QString &group, patch_list.childGroups()) {
         qDebug() << "Processing " << group << " patch item";
 
-        RusificationTreeItem *item = new RusificationTreeItem(group);
+        RusificationTreeItem* item = new RusificationTreeItem(group);
         item->parseSettingsItem(patch_list);
 
-        RusificationTreeItem *parent_item = findItemByName(root_item, item->parent_name);
+        QTreeWidgetItem* parent_item = findItemByName(ui->treeWidget_title->invisibleRootItem(), item->parent_name);
+        if (!parent_item)
+            parent_item = ui->treeWidget_title->invisibleRootItem();
+
         parent_item->addChild(item);
     }
 

+ 10 - 1
gui/rusificationwidget.ui

@@ -200,7 +200,16 @@ QScrollBar:vertical {
 
  QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      background: none;
- }</string>
+ }
+
+QTreeView::branch:closed:has-children{
+        background: pink;
+}
+
+QTreeView::branch:open:has-children{
+        background: magenta;
+}
+</string>
             </property>
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>