[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/marble/marble-1.1/src/plugins/render/positionmarker
From:       Torsten Rahn <tackat () kde ! org>
Date:       2011-01-05 14:56:45
Message-ID: 20110105145645.3C12BAC8B2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1212031 by rahn:

Backport:
rahn * r1212029
trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/
(PositionMarker.cpp PositionMarkerConfigWidget.ui)
- Tweaking the color selection a bit.




 M  +10 -11    PositionMarker.cpp  
 M  +17 -32    PositionMarkerConfigWidget.ui  


--- branches/marble/marble-1.1/src/plugins/render/positionmarker/PositionMarker.cpp \
#1212030:1212031 @@ -315,9 +315,9 @@
     }
 
     ui_configWidget->m_sizeLabel->setText( tr( "Cursor Size: %1" ).arg( cursorSize ) \
                );
-    QPalette palette;
-    palette.setColor( QPalette::Background, QColor( m_settings.value( "acColor" \
                ).value<QColor>()) );
-    ui_configWidget->m_acColorPreview->setPalette( palette );
+    QPalette palette = ui_configWidget->m_acColorChooserButton->palette();
+    palette.setColor( QPalette::Button, QColor( m_settings.value( "acColor" \
).value<QColor>()) ); +    ui_configWidget->m_acColorChooserButton->setPalette( \
palette );  }
 
 void PositionMarker::writeSettings()
@@ -369,7 +369,7 @@
     }
     else
     {
-        QMessageBox::warning( NULL, tr( "Error" ), tr( "Unable to load custom \
cursor, default cursor will be used. " +        QMessageBox::warning( NULL, tr( \
"Position Marker Plugin" ), tr( "Unable to load custom cursor, default cursor will be \
                used. "
                                                        "Make sure this is a valid \
                image file." ), QMessageBox::Ok );
         ui_configWidget->m_fileChooserButton->setIcon( QIcon( m_defaultCursor ) );
         m_customCursor = m_defaultCursor;
@@ -384,16 +384,15 @@
 
 void PositionMarker::chooseAccuracyCircleColor()
 {
-    QColorDialog dialog( m_acColor );
-    dialog.setOptions( QColorDialog::ShowAlphaChannel );
-    dialog.exec();
-    QColor c = dialog.selectedColor();
+    QColor c = QColorDialog::getColor( m_acColor, 0, 
+					"Please choose the color for the accuracy circle", 
+					QColorDialog::ShowAlphaChannel );
     if( c.isValid() )
     {
         m_acColor = c;
-        QPalette palette;
-        palette.setColor( QPalette::Background, m_acColor );
-        ui_configWidget->m_acColorPreview->setPalette( palette );
+        QPalette palette = ui_configWidget->m_acColorChooserButton->palette();
+        palette.setColor( QPalette::Button, m_acColor );
+        ui_configWidget->m_acColorChooserButton->setPalette( palette );
     }
 }
 
--- branches/marble/marble-1.1/src/plugins/render/positionmarker/PositionMarkerConfigWidget.ui \
#1212030:1212031 @@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>498</width>
-    <height>400</height>
+    <width>410</width>
+    <height>297</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -145,49 +145,34 @@
      <property name="title">
       <string>Colors</string>
      </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout_3">
-        <property name="bottomMargin">
-         <number>0</number>
-        </property>
-        <item>
-         <widget class="QPushButton" name="m_acColorChooserButton">
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="m_accuracyLabel">
           <property name="text">
-           <string>Accuracy Circle Color</string>
+         <string>Accuracy:</string>
           </property>
          </widget>
         </item>
-        <item>
-         <widget class="QWidget" name="m_acColorPreview" native="true">
+      <item row="0" column="1">
+       <widget class="QPushButton" name="m_acColorChooserButton">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
           <property name="minimumSize">
            <size>
-            <width>50</width>
+          <width>30</width>
             <height>30</height>
            </size>
           </property>
-          <property name="autoFillBackground">
-           <bool>true</bool>
+        <property name="text">
+         <string/>
           </property>
-          <zorder>horizontalSpacer_2</zorder>
          </widget>
         </item>
-        <item>
-         <spacer name="horizontalSpacer_2">
-          <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>
-      </item>
-     </layout>
     </widget>
    </item>
    <item>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic