]> git.sesse.net Git - kdenlive/commitdiff
Small markers ui fixes
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 15 Oct 2010 00:19:00 +0000 (00:19 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 15 Oct 2010 00:19:00 +0000 (00:19 +0000)
svn path=/trunk/kdenlive/; revision=5006

src/smallruler.cpp
src/widgets/markerdialog_ui.ui

index c0c20d581b9e774c7229b2b3c7e18f01d66f6c7e..028f38491d6f9366cce51e6d98eaed2b75d5b138 100644 (file)
@@ -38,6 +38,7 @@ SmallRuler::SmallRuler(MonitorManager *manager, QWidget *parent) :
     m_zoneEnd = 60;
     m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::PositiveBackground, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
     setMouseTracking(true);
+    setMinimumHeight(15);
 }
 
 void SmallRuler::adjustScale(int maximum)
@@ -154,25 +155,26 @@ void SmallRuler::updatePixmap()
     const int zoneEnd = (int)(m_zoneEnd * m_scale);
     p.fillRect(zoneStart, height() / 2 - 1, zoneEnd - zoneStart, height() / 2, m_zoneColor);
 
-    // draw markers
-    if (!m_markers.isEmpty()) {
-        p.setPen(Qt::red);
-        for (int i = 0; i < m_markers.count(); i++) {
-            p.drawLine(m_markers.at(i) * m_scale, 0, m_markers.at(i) * m_scale, 9);
-        }
-    }
+    // draw ruler
     p.setPen(palette().text().color());
     // draw the little marks
     fend = m_scale * m_small;
     if (fend > 2) for (f = 0; f < width(); f += fend) {
-            p.drawLine((int)f, 0, (int)f, 3);
-        }
+        p.drawLine((int)f, 0, (int)f, 3);
+    }
 
     // draw medium marks
     fend = m_scale * m_medium;
     if (fend > 2) for (f = 0; f < width(); f += fend) {
-            p.drawLine((int)f, 0, (int)f, 6);
+       p.drawLine((int)f, 0, (int)f, 6);
+    }
+    // draw markers
+    if (!m_markers.isEmpty()) {
+        p.setPen(Qt::red);
+        for (int i = 0; i < m_markers.count(); i++) {
+            p.drawLine(m_markers.at(i) * m_scale, 0, m_markers.at(i) * m_scale, 9);
         }
+    }
     p.end();
     update();
 }
index 2a021dbe25ad3a5f02b4f1095f1e298f4faaa5b3..cf09cf52d936af3d80a614886f96a7c5cbd78d46 100644 (file)
@@ -6,15 +6,31 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>322</width>
-    <height>111</height>
+    <width>312</width>
+    <height>88</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Marker</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="3" column="0" colspan="3">
+   <item row="2" column="1" colspan="3">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>218</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="2">
+    <layout class="QHBoxLayout" name="inputLayout"/>
+   </item>
+   <item row="3" column="0" colspan="4">
     <widget class="QDialogButtonBox" name="buttonBox">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </widget>
    </item>
-   <item row="2" column="1" colspan="2">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>218</width>
-       <height>2</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="0" rowspan="2">
+   <item row="0" column="0" rowspan="3">
     <widget class="QLabel" name="clip_thumb">
      <property name="frameShape">
-      <enum>QFrame::Box</enum>
+      <enum>QFrame::NoFrame</enum>
      </property>
      <property name="text">
       <string>Image preview</string>
@@ -57,7 +60,7 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="2">
+   <item row="1" column="2" colspan="2">
     <widget class="KLineEdit" name="marker_comment"/>
    </item>
    <item row="0" column="1">
      </property>
     </widget>
    </item>
-   <item row="0" column="2">
-    <layout class="QHBoxLayout" name="inputLayout"/>
+   <item row="0" column="3">
+    <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>
   </layout>
-  <zorder>buttonBox</zorder>
-  <zorder>clip_filesize_3</zorder>
-  <zorder>clip_thumb</zorder>
-  <zorder>marker_comment</zorder>
-  <zorder>clip_filesize_2</zorder>
  </widget>
  <customwidgets>
   <customwidget>