[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso resources/themes/default/traversotheme...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso resources/themes/default/traversotheme... |
Date: |
Tue, 27 Nov 2007 13:11:57 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/11/27 13:11:57
Modified files:
resources/themes/default: traversotheme.xml
resources/themes/medium-contrast: traversotheme.xml
resources/themes/ubuntu: traversotheme.xml
src/core : Themer.cpp
src/traverso/songcanvas: Cursors.cpp Cursors.h
Log message:
* use a dashed line for the work cursor
* remove play/workcursors from theme files, and use 1 default defined
in Themer itself.
Use red for the playhead, and gray-blue for the workcursor.
Comments welcome :)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/default/traversotheme.xml?cvsroot=traverso&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/medium-contrast/traversotheme.xml?cvsroot=traverso&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/ubuntu/traversotheme.xml?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Themer.cpp?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.cpp?cvsroot=traverso&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.h?cvsroot=traverso&r1=1.15&r2=1.16
Patches:
Index: resources/themes/default/traversotheme.xml
===================================================================
RCS file:
/sources/traverso/traverso/resources/themes/default/traversotheme.xml,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- resources/themes/default/traversotheme.xml 23 Nov 2007 14:21:07 -0000
1.46
+++ resources/themes/default/traversotheme.xml 27 Nov 2007 13:11:56 -0000
1.47
@@ -131,9 +131,6 @@
<color name="InfoWidget:background" red="160" green="170"
blue="150" alpha="255" />
- <color name="Playhead:active" red="180" green="189" blue="240"
alpha="220" />
- <color name="Playhead:inactive" red="180" green="189"
blue="240" alpha="220" />
-
<color name="Plugin:background" red="230" green="0" blue="230"
alpha="170" />
<color name="Plugin:background:bypassed" red="230" green="0"
blue="230" alpha="80" />
<color name="Plugin:text" red="255" green="255" blue="255"
alpha="255" />
@@ -171,8 +168,6 @@
<color name="TrackPanel:bus:background" red="237" green="237"
blue="250" alpha="255" />
<color name="TrackPanel:bus:margin" red="200" green="200"
blue="200" alpha="255" />
- <color name="Workcursor:default" red="255" green="0" blue="0"
alpha="255" />
-
<color name="Marker:default" red="128" green="0" blue="128"
alpha="255" />
<color name="Marker:end" red="50" green="0" blue="255"
alpha="255" />
<color name="Marker:blinkend" red="128" green="0" blue="255"
alpha="255" />
Index: resources/themes/medium-contrast/traversotheme.xml
===================================================================
RCS file:
/sources/traverso/traverso/resources/themes/medium-contrast/traversotheme.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- resources/themes/medium-contrast/traversotheme.xml 24 Nov 2007 22:36:02
-0000 1.3
+++ resources/themes/medium-contrast/traversotheme.xml 27 Nov 2007 13:11:56
-0000 1.4
@@ -130,9 +130,6 @@
<color name="InfoWidget:background" red="160" green="170"
blue="150" alpha="255" />
- <color name="Playhead:active" red="255" green="0" blue="0"
alpha="255" />
- <color name="Playhead:inactive" red="255" green="0" blue="0"
alpha="80" />
-
<color name="Plugin:background" red="0" green="0" blue="150"
alpha="220" />
<color name="Plugin:background:bypassed" red="100" green="100"
blue="150" alpha="150" />
<color name="Plugin:text" red="255" green="255" blue="255"
alpha="255" />
@@ -170,8 +167,6 @@
<color name="TrackPanel:bus:background" red="237" green="237"
blue="250" alpha="255" />
<color name="TrackPanel:bus:margin" red="100" green="100"
blue="100" alpha="255" />
- <color name="Workcursor:default" red="0" green="0" blue="0"
alpha="255" />
-
<color name="Marker:default" red="0" green="200" blue="0"
alpha="255" />
<color name="Marker:blink" red="50" green="255" blue="50"
alpha="255" />
<color name="Marker:end" red="255" green="0" blue="0"
alpha="255" />
Index: resources/themes/ubuntu/traversotheme.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/themes/ubuntu/traversotheme.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- resources/themes/ubuntu/traversotheme.xml 24 Nov 2007 16:59:48 -0000
1.2
+++ resources/themes/ubuntu/traversotheme.xml 27 Nov 2007 13:11:56 -0000
1.3
@@ -130,9 +130,6 @@
<color name="InfoWidget:background" red="239" green="236"
blue="231" alpha="255" />
- <color name="Playhead:active" red="150" green="0" blue="0"
alpha="255" />
- <color name="Playhead:inactive" red="150" green="0" blue="0"
alpha="80" />
-
<color name="Plugin:background" red="251" green="206"
blue="138" alpha="255" />
<color name="Plugin:background:bypassed" red="251" green="206"
blue="138" alpha="50" />
<color name="Plugin:text" red="0" green="0" blue="0"
alpha="255" />
@@ -170,8 +167,6 @@
<color name="TrackPanel:bus:background" red="237" green="237"
blue="250" alpha="255" />
<color name="TrackPanel:bus:margin" red="203" green="193"
blue="183" alpha="255" />
- <color name="Workcursor:default" red="0" green="0" blue="0"
alpha="255" />
-
<color name="Marker:default" red="203" green="193" blue="183"
alpha="255" />
<color name="Marker:blink" red="251" green="206" blue="138"
alpha="255" />
<color name="Marker:end" red="203" green="193" blue="183"
alpha="255" />
Index: src/core/Themer.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Themer.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/core/Themer.cpp 24 Nov 2007 10:27:15 -0000 1.8
+++ src/core/Themer.cpp 27 Nov 2007 13:11:56 -0000 1.9
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: Themer.cpp,v 1.8 2007/11/24 10:27:15 r_sijrier Exp $
+$Id: Themer.cpp,v 1.9 2007/11/27 13:11:56 r_sijrier Exp $
*/
#include "Themer.h"
@@ -413,8 +413,8 @@
if (name == "InfoWidget:background") c =
p.color(QPalette::Window);
- if (name == "Playhead:active") c = Qt::red;
- if (name == "Playhead:inactive") c = p.color(QPalette::Mid);
+ if (name == "Playhead:active") c = QColor(255, 0, 0, 180);
+ if (name == "Playhead:inactive") c = QColor(255, 0, 0, 120);
if (name == "Plugin:background") c = p.color(QPalette::Button);
if (name == "Plugin:background:bypassed") c =
p.color(QPalette::Light);
@@ -453,7 +453,7 @@
if (name == "TrackPanel:bus:background") c =
p.color(QPalette::Button);
if (name == "TrackPanel:bus:margin") c =
p.color(QPalette::Dark);
- if (name == "Workcursor:default") c =
p.color(QPalette::WindowText);
+ if (name == "Workcursor:default") c = QColor(100, 50, 100, 180);
if (name == "Marker:default") c = Qt::red;
if (name == "Marker:blink") c = p.color(QPalette::Highlight);
Index: src/traverso/songcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- src/traverso/songcanvas/Cursors.cpp 5 Nov 2007 15:49:31 -0000 1.31
+++ src/traverso/songcanvas/Cursors.cpp 27 Nov 2007 13:11:56 -0000 1.32
@@ -271,7 +271,11 @@
Q_UNUSED(option);
Q_UNUSED(widget);
- painter->fillRect(0, 0, (int)m_boundingRect.width(),
(int)m_boundingRect.height(), themer()->get_color("Workcursor:default"));
+ if (m_pix.height() != int(m_boundingRect.height())) {
+ update_background();
+ }
+
+ painter->drawPixmap(0, 0, m_boundingRect.width(),
m_boundingRect.height(), m_pix);
}
void WorkCursor::update_position()
@@ -284,5 +288,18 @@
m_boundingRect = rect;
}
+void WorkCursor::update_background()
+{
+ m_pix = QPixmap(int(m_boundingRect.width()),
int(m_boundingRect.height()));
+ m_pix.fill(Qt::transparent);
+ QPainter p(&m_pix);
+ QPen pen;
+ pen.setWidth(4);
+ pen.setStyle(Qt::DashDotLine);
+ pen.setColor(themer()->get_color("Workcursor:default"));
+ p.setPen(pen);
+ p.drawLine(0, 0, int(m_boundingRect.width()),
int(m_boundingRect.height()));
+}
+
Index: src/traverso/songcanvas/Cursors.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/traverso/songcanvas/Cursors.h 30 May 2007 18:04:18 -0000 1.15
+++ src/traverso/songcanvas/Cursors.h 27 Nov 2007 13:11:56 -0000 1.16
@@ -97,6 +97,9 @@
private:
Song* m_song;
SongView* m_sv;
+ QPixmap m_pix;
+
+ void update_background();
public slots:
void update_position();