Package: kweather Version: 3.5.4-1 Tags: patch Hello, I have the same problem and this week I finally get fed up. I'm sending the patch. Chali Ahmul M.P.U
diff -U1 kdetoys-3.5.4/kweather/dockwidget.cpp kdetoys-3.5.4b/kweather/dockwidget.cpp
--- kdetoys-3.5.4/kweather/dockwidget.cpp 2006-01-19 17:48:18.000000000 +0100
+++ kdetoys-3.5.4b/kweather/dockwidget.cpp 2006-10-08 23:57:58.000000000 +0200
@@ -40,3 +40,4 @@
- setBackgroundOrigin( AncestorOrigin );
+ //setBackgroundOrigin( AncestorOrigin );
+ setBackgroundMode(X11ParentRelative);
}
@@ -137,5 +138,9 @@
- m_lblTemp->setBackgroundOrigin(AncestorOrigin);
- m_lblWind->setBackgroundOrigin(AncestorOrigin);
- m_lblPres->setBackgroundOrigin(AncestorOrigin);
+ //m_lblTemp->setBackgroundOrigin(AncestorOrigin);
+ //m_lblWind->setBackgroundOrigin(AncestorOrigin);
+ //m_lblPres->setBackgroundOrigin(AncestorOrigin);
+
+ m_lblTemp->setBackgroundMode(X11ParentRelative);
+ m_lblWind->setBackgroundMode(X11ParentRelative);
+ m_lblPres->setBackgroundMode(X11ParentRelative);
@@ -285,2 +290,12 @@
+void dockwidget::setFontColor(const QColor &color)
+{
+ // transparent labels are doing strange thins
+ QPalette pal = m_lblTemp->parentWidget()->palette();
+ pal.setColor(QColorGroup::Foreground, color);
+ m_lblTemp->setPalette(pal);
+ m_lblWind->setPalette(pal);
+ m_lblPres->setPalette(pal);
+}
+
#include "dockwidget.moc"
diff -U1 kdetoys-3.5.4/kweather/dockwidget.h kdetoys-3.5.4b/kweather/dockwidget.h
--- kdetoys-3.5.4/kweather/dockwidget.h 2005-09-10 10:21:23.000000000 +0200
+++ kdetoys-3.5.4b/kweather/dockwidget.h 2006-10-07 21:16:58.000000000 +0200
@@ -48,2 +48,3 @@
int heightForWidth(int w);
+ void setFontColor(const QColor &color);
Common subdirectories: kdetoys-3.5.4/kweather/graphics and kdetoys-3.5.4b/kweather/graphics
diff -U1 kdetoys-3.5.4/kweather/kcmweather.cpp kdetoys-3.5.4b/kweather/kcmweather.cpp
--- kdetoys-3.5.4/kweather/kcmweather.cpp 2005-10-10 16:58:37.000000000 +0200
+++ kdetoys-3.5.4b/kweather/kcmweather.cpp 2006-10-08 23:56:50.000000000 +0200
@@ -36,2 +36,4 @@
+#include <kcolorbutton.h>
+
#include "dockwidget.h"
@@ -70,2 +72,4 @@
SLOT( reportLocationChanged() ) );
+ connect( mWidget->m_fontColor, SIGNAL( changed( const QColor & ) ),
+ SLOT ( fontColorChanged( const QColor & ) ) );
@@ -124,2 +128,7 @@
+void KCMWeather::fontColorChanged( const QColor & color )
+{
+ emit changed( true );
+}
+
void KCMWeather::load()
@@ -139,2 +148,4 @@
mWidget->m_viewMode->setButton( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
+ mWidget->m_fontColor->setColor( config.readColorEntry( "font_color" ) );
+
changeViewMode( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
@@ -154,2 +165,3 @@
config.writeEntry( "smallview_mode", mViewMode );
+ config.writeEntry( "font_color", mWidget->m_fontColor->color() );
config.sync();
diff -U1 kdetoys-3.5.4/kweather/kcmweather.h kdetoys-3.5.4b/kweather/kcmweather.h
--- kdetoys-3.5.4/kweather/kcmweather.h 2005-10-10 16:58:37.000000000 +0200
+++ kdetoys-3.5.4b/kweather/kcmweather.h 2006-10-04 22:39:54.000000000 +0200
@@ -50,2 +50,3 @@
void reportLocationChanged();
+ void fontColorChanged( const QColor & );
diff -U1 kdetoys-3.5.4/kweather/kweather.cpp kdetoys-3.5.4b/kweather/kweather.cpp
--- kdetoys-3.5.4/kweather/kweather.cpp 2006-03-17 11:13:16.000000000 +0100
+++ kdetoys-3.5.4b/kweather/kweather.cpp 2006-10-08 23:55:36.000000000 +0200
@@ -65,2 +65,3 @@
connect(dockWidget, SIGNAL(buttonClicked()), SLOT(doReport()));
+ dockWidget->setFontColor(fontColor);
dockWidget->setViewMode(mViewMode);
@@ -205,2 +206,3 @@
mViewMode = kcConfig->readNumEntry("smallview_mode", dockwidget::ShowAll);
+ fontColor = kcConfig->readColorEntry("font_color");
}
@@ -217,2 +219,3 @@
kcConfig->writePathEntry("log_file_name", fileName );
+ kcConfig->writeEntry( "font_color", fontColor );
kcConfig->sync();
@@ -317,2 +320,3 @@
dockWidget->setViewMode(mViewMode);
+ dockWidget->setFontColor(fontColor);
emit updateLayout();
diff -U1 kdetoys-3.5.4/kweather/kweather.h kdetoys-3.5.4b/kweather/kweather.h
--- kdetoys-3.5.4/kweather/kweather.h 2005-09-10 10:21:23.000000000 +0200
+++ kdetoys-3.5.4b/kweather/kweather.h 2006-10-08 23:54:34.000000000 +0200
@@ -69,2 +69,3 @@
QString metarData;
+ QColor fontColor;
bool logOn;
diff -U1 kdetoys-3.5.4/kweather/prefdialogdata.ui kdetoys-3.5.4b/kweather/prefdialogdata.ui
--- kdetoys-3.5.4/kweather/prefdialogdata.ui 2005-09-10 10:21:23.000000000 +0200
+++ kdetoys-3.5.4b/kweather/prefdialogdata.ui 2006-10-07 21:25:54.000000000 +0200
@@ -11,4 +11,4 @@
<y>0</y>
- <width>429</width>
- <height>289</height>
+ <width>504</width>
+ <height>296</height>
</rect>
@@ -35,2 +35,5 @@
</property>
+ <property name="caption">
+ <string>prefsDialogData</string>
+ </property>
<property name="focusPolicy">
@@ -176,2 +179,5 @@
</property>
+ <property name="accel">
+ <string>Alt+W</string>
+ </property>
<property name="checked">
@@ -187,2 +193,48 @@
<property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Toolbar</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_lblFontColor</cstring>
+ </property>
+ <property name="text">
+ <string>Font Color:</string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>m_fontColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>141</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
<cstring>GroupBox1</cstring>
@@ -211,2 +263,5 @@
</property>
+ <property name="accel">
+ <string>Alt+N</string>
+ </property>
</widget>
@@ -283,2 +338,3 @@
<include location="local" impldecl="in implementation">kdialog.h</include>
+ <include location="local" impldecl="in implementation">prefdialogdata.ui.h</include>
</includes>
@@ -286,2 +342,9 @@
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
</UI>
Attachment:
pgpBXgRNYJf19.pgp
Description: PGP signature