Bug 80445 - More customability to KWeather
Summary: More customability to KWeather
Status: RESOLVED FIXED
Alias: None
Product: kweather-kde3
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: geiseri
URL:
Keywords:
: 99526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-27 01:00 UTC by Thomas Wolfe
Modified: 2008-01-03 21:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolfe 2004-04-27 01:00:14 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs

This is similar to another wish I reported:
http://bugs.kde.org/show_bug.cgi?id=80444
but this time I would like to be able to change the size of the text in KWeather and the color of the text, I know with the clock it is very easy to do this.  Right now for me its way to big.  Also I know many people would probably like to be able to choose between Celsius and fahrenheit.  Thanks again for listening.
Comment 1 Christian Loose 2004-04-27 09:46:35 UTC
Changed product to kweather.
Comment 2 Thomas Wolfe 2004-04-28 02:49:25 UTC
Thanks, I did not see that.
Comment 3 p92 2004-10-27 17:14:28 UTC
I also vote for this enhancement wish especially font color of the applet.

When kicker is transparent, a black font is really difficult to read !

Thanks.
Comment 4 p92 2005-07-13 21:13:55 UTC
still needed my wish in comment #3
Comment 5 Bram Schoenmakers 2005-08-23 15:36:52 UTC
*** Bug 99526 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Winter 2005-08-23 18:27:36 UTC
*** This bug has been confirmed by popular vote. ***
Comment 7 Reigo Reinmets 2006-01-19 20:25:46 UTC
This is definetly an issue that must be addressed! Im using a transparent taskbar also and my clock is white.. But kweather is black and mostly unreadble...
Comment 8 Pupeno 2006-07-06 11:41:20 UTC
I have the problem that it uses some normall font, which is too big for kicker so I can't read the temperature, it is too big and doesn't fit.
Being able to choose the size of the fonts used would be handy, automatically shrinking the label to fit would be awesome.
Comment 9 Patrick 2007-01-25 20:10:47 UTC
Yes, we _need_ configurable font display (colour, size). This missing feature renders kweather unusable for me :(
Also tooltip display with configurable information would be great, in case you just show the icon, but want more information while passing with the mouse cursor.
Comment 10 Jeremy 2007-02-23 22:12:53 UTC
I agree! My background also is dark and my panel is transparent, thus making it almost impossible to read. A text configure option like the clock would make this applet so much better.
Comment 11 Martin Koller 2007-02-23 23:47:02 UTC
SVN commit 636720 by mkoller:

BUG: 80445
GUI:

Add possibility to define the text color


 M  +0 -1      dockwidget.h  
 M  +13 -0     kcmweather.cpp  
 M  +1 -0      kcmweather.h  
 M  +6 -1      kweather.cpp  
 M  +1 -0      kweather.h  
 M  +60 -1     prefdialogdata.ui  


--- branches/KDE/3.5/kdetoys/kweather/dockwidget.h #636719:636720
@@ -40,7 +40,6 @@
 
     void setLocationCode(const QString &locationCode);
     void setViewMode(int);
-    void setFont(QFont newFont);
     void setOrientation(Orientation o) { m_orientation = o; }
     /** resize the view **/
     void resizeView(const QSize &size);
--- branches/KDE/3.5/kdetoys/kweather/kcmweather.cpp #636719:636720
@@ -33,6 +33,7 @@
 #include <klocale.h>
 #include <kurlrequester.h>
 #include <kcombobox.h>
+#include <kcolorbutton.h>
 
 #include "dockwidget.h"
 #include "prefdialogdata.h"
@@ -68,6 +69,8 @@
                                 SLOT( changeViewMode( int ) ) );
   connect( mWidget->m_reportLocation, SIGNAL( activated( const QString& ) ),
                                       SLOT( reportLocationChanged() ) );
+  connect( mWidget->m_textColor, SIGNAL( changed(const QColor &) ),
+                                 SLOT( textColorChanged(const QColor &) ) );
 
   KAboutData *about = new KAboutData(
       I18N_NOOP( "kcmweather" ),
@@ -151,6 +154,11 @@
   emit changed( true );
 }
 
+void KCMWeather::textColorChanged(const QColor &)
+{
+  emit changed( true );
+}
+
 void KCMWeather::load()
 {
   kdDebug() << "Load" << endl;
@@ -161,6 +169,10 @@
   mWidget->m_enableLog->setChecked( enabled );
   enableLogWidgets( enabled );
 
+  static QColor black(Qt::black);
+  QColor textColor = config.readColorEntry("textColor", &black);
+  mWidget->m_textColor->setColor(textColor);
+
   QString loc =  config.readEntry( "report_location" );
 
   mWidget->m_logFile->setURL( config.readPathEntry( "log_file_name" ) );
@@ -181,6 +193,7 @@
   config.setGroup( "General Options" );
   config.writeEntry( "logging", mWidget->m_enableLog->isChecked() );
   config.writeEntry( "log_file_name", mWidget->m_logFile->url() );
+  config.writeEntry( "textColor", mWidget->m_textColor->color() );
 
   // Station idx to local idx; if nothing selected yet, keep it empty
   QString loc;
--- branches/KDE/3.5/kdetoys/kweather/kcmweather.h #636719:636720
@@ -47,6 +47,7 @@
     void enableLogWidgets( bool value );
     void changeViewMode( int mode );
     void reportLocationChanged();
+    void textColorChanged(const QColor &);
 
   private:
     prefsDialogData *mWidget;
--- branches/KDE/3.5/kdetoys/kweather/kweather.cpp #636719:636720
@@ -52,7 +52,7 @@
         QWidget *parent, const char *name):
         KPanelApplet(configFile, t, actions, parent, name), weatherIface(),
         mFirstRun( false ), mReport( 0 ), mClient( 0 ),
-        mContextMenu( 0 ), mWeatherService( 0 ), settingsDialog( 0 )
+        mContextMenu( 0 ), mWeatherService( 0 ), settingsDialog( 0 ), mTextColor(Qt::black)
 {
 	kdDebug(12004) << "Constructor " << endl;
 	setObjId("weatherIface");
@@ -64,6 +64,7 @@
 	dockWidget = new dockwidget(reportLocation, this, "dockwidget");
 	connect(dockWidget, SIGNAL(buttonClicked()), SLOT(doReport()));
 	dockWidget->setViewMode(mViewMode);
+	dockWidget->setPaletteForegroundColor(mTextColor);
 
 	timeOut = new QTimer(this, "timeOut" );
 	connect(timeOut, SIGNAL(timeout()), SLOT(timeout()));
@@ -212,6 +213,9 @@
     fileName = kcConfig->readPathEntry("log_file_name");
     reportLocation = kcConfig->readEntry("report_location");
     mViewMode = kcConfig->readNumEntry("smallview_mode", dockwidget::ShowAll);
+
+    static QColor black(Qt::black);
+    mTextColor = kcConfig->readColorEntry("textColor", &black);
 }
 
 /** Save the application mPrefs. */
@@ -324,6 +328,7 @@
 
     dockWidget->setLocationCode(reportLocation);
     dockWidget->setViewMode(mViewMode);
+    dockWidget->setPaletteForegroundColor(mTextColor);
     emit updateLayout();
 
     if (logOn && !fileName.isEmpty())
--- branches/KDE/3.5/kdetoys/kweather/kweather.h #636719:636720
@@ -78,6 +78,7 @@
 	KPopupMenu *mContextMenu;
 	WeatherService_stub *mWeatherService;
 	KCMultiDialog *settingsDialog;
+	QColor mTextColor;
 };
 
 #endif
--- branches/KDE/3.5/kdetoys/kweather/prefdialogdata.ui #636719:636720
@@ -10,7 +10,7 @@
             <x>0</x>
             <y>0</y>
             <width>429</width>
-            <height>289</height>
+            <height>341</height>
         </rect>
     </property>
     <property name="sizePolicy">
@@ -271,8 +271,66 @@
                 </widget>
             </grid>
         </widget>
+        <widget class="QGroupBox">
+            <property name="name">
+                <cstring>groupBox3</cstring>
+            </property>
+            <property name="title">
+                <string>Text</string>
+            </property>
+            <hbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout1</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>textLabel1</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Color:</string>
+                            </property>
+                        </widget>
+                        <widget class="KColorButton">
+                            <property name="name">
+                                <cstring>m_textColor</cstring>
+                            </property>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+                <spacer>
+                    <property name="name">
+                        <cstring>spacer3</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>170</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+            </hbox>
+        </widget>
     </vbox>
 </widget>
+<customwidgets>
+</customwidgets>
 <connections>
     <connection>
         <sender>m_enableLog</sender>
@@ -297,5 +355,6 @@
     <includehint>kurlrequester.h</includehint>
     <includehint>klineedit.h</includehint>
     <includehint>kpushbutton.h</includehint>
+    <includehint>kcolorbutton.h</includehint>
 </includehints>
 </UI>
Comment 12 p92 2008-01-03 11:48:51 UTC
Not only text color (currently implemented) but also background color and transparency implementation would allow kweather to better fit in modern kicker panel.
Comment 13 Pupeno 2008-01-03 21:06:12 UTC
At this moment I would prioritize have it working with KDE 4 if it is not already. But that's just a user's opinion.