[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/krita-mvc-rempt] krita/plugins/paintops/libpaintop: update layout for stamp tool to be mor
From:       Scott Petrovic <scottpetrovic () gmail ! com>
Date:       2014-11-30 18:31:16
Message-ID: E1Xv9HA-0002Wu-MN () scm ! kde ! org
[Download RAW message or body]

Git commit fe57cb97b3803f4f5a6601264a04590e91661cf1 by Scott Petrovic.
Committed on 30/11/2014 at 18:31.
Pushed by scottpetrovic into branch 'krita-mvc-rempt'.

update layout for stamp tool to be more consistent

M  +222  -158  krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui
M  +1    -0    krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp

http://commits.kde.org/calligra/fe57cb97b3803f4f5a6601264a04590e91661cf1

diff --git a/krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui \
b/krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui index 6f330a8..387314b \
                100644
--- a/krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui
+++ b/krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui
@@ -6,135 +6,28 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>270</width>
-    <height>293</height>
+    <width>462</width>
+    <height>311</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout">
-   <property name="margin">
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <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>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <widget class="QLabel" name="brushNameLbl">
-       <property name="text">
-        <string>Name:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLineEdit" name="nameLineEdit"/>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QGridLayout">
-     <property name="margin">
-      <number>0</number>
-     </property>
-     <item row="0" column="0">
-      <widget class="QLabel" name="textLabel2">
-       <property name="text">
-        <string>Style:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QComboBox" name="comboBox2">
-       <property name="enabled">
-        <bool>false</bool>
-       </property>
-       <property name="currentIndex">
-        <number>2</number>
-       </property>
-       <item>
-        <property name="text">
-         <string>Constant</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>Random</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>Incremental</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>Pressure</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>Angular</string>
-        </property>
-       </item>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="textLabel3">
-       <property name="text">
-        <string>Selection mode:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QComboBox" name="brushStyle">
-       <item>
-        <property name="text">
-         <string>Regular</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>Animated</string>
-        </property>
-       </item>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QCheckBox" name="colorAsMask">
-     <property name="text">
-      <string>Use color as mask</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout">
-     <property name="margin">
-      <number>0</number>
-     </property>
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
      <item>
       <widget class="QLabel" name="preview">
        <property name="sizePolicy">
@@ -145,27 +38,27 @@
        </property>
        <property name="minimumSize">
         <size>
-         <width>50</width>
-         <height>50</height>
+         <width>110</width>
+         <height>110</height>
         </size>
        </property>
+       <property name="frameShape">
+        <enum>QFrame::Box</enum>
+       </property>
        <property name="text">
         <string/>
        </property>
       </widget>
      </item>
      <item>
-      <spacer>
+      <spacer name="verticalSpacer_2">
        <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
+        <enum>Qt::Vertical</enum>
        </property>
        <property name="sizeHint" stdset="0">
         <size>
-         <width>40</width>
-         <height>20</height>
+         <width>20</width>
+         <height>40</height>
         </size>
        </property>
       </spacer>
@@ -173,40 +66,211 @@
     </layout>
    </item>
    <item>
-    <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
+    <layout class="QVBoxLayout" name="verticalLayout">
      <item>
-      <widget class="QLabel" name="spacingLbl">
-       <property name="text">
-        <string>Spacing:</string>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="1">
+        <widget class="QLineEdit" name="nameLineEdit"/>
+       </item>
+       <item row="1" column="1">
+        <widget class="KisSpacingSelectionWidget" name="spacingWidget" \
native="true"/> +       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="spacingLbl">
+         <property name="text">
+          <string>Spacing:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0">
+        <widget class="QLabel" name="brushNameLbl">
+         <property name="text">
+          <string>Name:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1">
+        <widget class="QCheckBox" name="colorAsMask">
+         <property name="text">
+          <string>Use color as mask</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox">
+       <property name="minimumSize">
+        <size>
+         <width>0</width>
+         <height>110</height>
+        </size>
        </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       <property name="title">
+        <string>Brush Style</string>
+       </property>
+       <property name="checkable">
+        <bool>false</bool>
        </property>
+       <widget class="QWidget" name="gridLayoutWidget_2">
+        <property name="geometry">
+         <rect>
+          <x>20</x>
+          <y>20</y>
+          <width>301</width>
+          <height>71</height>
+         </rect>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_2">
+         <property name="spacing">
+          <number>3</number>
+         </property>
+         <item row="0" column="0" alignment="Qt::AlignRight">
+          <widget class="QLabel" name="textLabel2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Style:</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="brushStyle">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <item>
+            <property name="text">
+             <string>Regular</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Animated</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="1" column="0" alignment="Qt::AlignRight">
+          <widget class="QLabel" name="textLabel3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Selection mode:</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QComboBox" name="comboBox2">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="currentIndex">
+            <number>2</number>
+           </property>
+           <item>
+            <property name="text">
+             <string>Constant</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Random</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Incremental</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Pressure</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Angular</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+        </layout>
+       </widget>
       </widget>
      </item>
      <item>
-      <widget class="KisSpacingSelectionWidget" name="spacingWidget" native="true"/>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QVBoxLayout">
-     <property name="margin">
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="QPushButton" name="brushButton">
-       <property name="text">
-        <string>Use as Tip</string>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
        </property>
-      </widget>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="addButton">
-       <property name="text">
-        <string>Add to Predefined Tips</string>
-       </property>
-      </widget>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="brushButton">
+         <property name="text">
+          <string>Use as Tip</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="addButton">
+         <property name="text">
+          <string>Add to Predefined Tips</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
     </layout>
    </item>
diff --git a/krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp \
b/krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp index \
                415f2ff..630aff5 100644
--- a/krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp
+++ b/krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp
@@ -54,6 +54,7 @@ KisCustomBrushWidget::KisCustomBrushWidget(QWidget *parent, const \
QString& capti  setWindowTitle(caption);
     preview->setScaledContents(true);
     preview->setFixedSize(preview->size());
+    preview->setStyleSheet("border: 2px solid #222; border-radius: 4px; padding: \
5px; font: normal 10px;");  
     KisBrushResourceServer* rServer = KisBrushServer::instance()->brushServer();
     m_rServerAdapter = QSharedPointer<KisBrushResourceServerAdapter>(new \
KisBrushResourceServerAdapter(rServer));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic