Commit 0db71755 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Round recangle border in titles (patch from Till Theato) + small cleanup in titlewidget ui

svn path=/trunk/kdenlive/; revision=4239
parent 796555a4
......@@ -333,7 +333,7 @@ int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGra
QString br_str = items.item(i).namedItem("content").attributes().namedItem("brushcolor").nodeValue();
QString pen_str = items.item(i).namedItem("content").attributes().namedItem("pencolor").nodeValue();
double penwidth = items.item(i).namedItem("content").attributes().namedItem("penwidth").nodeValue().toDouble();
QGraphicsRectItem *rec = m_scene->addRect(stringToRect(rect), QPen(QBrush(stringToColor(pen_str)), penwidth), QBrush(stringToColor(br_str)));
QGraphicsRectItem *rec = m_scene->addRect(stringToRect(rect), QPen(QBrush(stringToColor(pen_str)), penwidth, Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin), QBrush(stringToColor(br_str)));
gitem = rec;
} else if (items.item(i).attributes().namedItem("type").nodeValue() == "QGraphicsPixmapItem") {
QString url = items.item(i).namedItem("content").attributes().namedItem("url").nodeValue();
......
......@@ -724,6 +724,7 @@ void TitleWidget::slotNewRect(QGraphicsRectItem * rect)
f.setAlpha(rectFAlpha->value());
QPen penf(f);
penf.setWidth(rectLineWidth->value());
penf.setJoinStyle(Qt::RoundJoin);
rect->setPen(penf);
QColor b = rectBColor->color();
b.setAlpha(rectBAlpha->value());
......@@ -1484,6 +1485,7 @@ void TitleWidget::rectChanged()
f.setAlpha(rectFAlpha->value());
QPen penf(f);
penf.setWidth(rectLineWidth->value());
penf.setJoinStyle(Qt::RoundJoin);
rec->setPen(penf);
QColor b = rectBColor->color();
b.setAlpha(rectBAlpha->value());
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>900</width>
<height>579</height>
<width>977</width>
<height>633</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -45,143 +45,152 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Plain</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>2</number>
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="positionLayout">
<item>
<widget class="QPushButton" name="origin_x_left">
<property name="text">
<string>+X</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="value_x">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="origin_y_top">
<property name="text">
<string>+Y</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="value_y">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lWidth">
<property name="text">
<string>W</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="value_w">
<property name="minimum">
<number>-1000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="text">
<string>H</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="value_h">
<property name="minimum">
<number>-1000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="zUp">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="zDown">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="zTop">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="zBottom">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Z-Index:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="zValue">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
</layout>
<widget class="QPushButton" name="origin_x_left">
<property name="text">
<string>+X</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="value_x">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="origin_y_top">
<property name="text">
<string>+Y</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QSpinBox" name="value_y">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="lWidth">
<property name="text">
<string>W</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QSpinBox" name="value_w">
<property name="minimum">
<number>-1000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QLabel" name="label_19">
<property name="text">
<string>H</string>
</property>
</widget>
</item>
<item row="0" column="7">
<widget class="QSpinBox" name="value_h">
<property name="minimum">
<number>-1000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
<item row="0" column="8">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>94</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="9">
<widget class="QToolButton" name="zUp">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="10">
<widget class="QToolButton" name="zDown">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="11">
<widget class="QToolButton" name="zTop">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="12">
<widget class="QToolButton" name="zBottom">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="13">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Z-Index:</string>
</property>
</widget>
</item>
<item row="0" column="14">
<widget class="QSpinBox" name="zValue">
<property name="minimum">
<number>-5000</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
</item>
</layout>
</widget>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment