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

List:       kde-commits
Subject:    [marble] src/lib/marble: legend: checkbox directly for section and no text repeat
From:       Thibaut Gridel <tgridel () free ! fr>
Date:       2014-01-04 21:43:02
Message-ID: E1VzYzm-0003y0-FQ () scm ! kde ! org
[Download RAW message or body]

Git commit 5aeb409ba7f0b2f07e08f08b2ff8f241eb9715e5 by Thibaut Gridel.
Committed on 04/01/2014 at 20:58.
Pushed by tgridel into branch 'master'.

legend: checkbox directly for section and no text repeat

M  +5    -3    src/lib/marble/MarbleLegendBrowser.cpp

http://commits.kde.org/marble/5aeb409ba7f0b2f07e08f08b2ff8f241eb9715e5

diff --git a/src/lib/marble/MarbleLegendBrowser.cpp \
b/src/lib/marble/MarbleLegendBrowser.cpp index 4fa7f0c..8496960 100644
--- a/src/lib/marble/MarbleLegendBrowser.cpp
+++ b/src/lib/marble/MarbleLegendBrowser.cpp
@@ -286,7 +286,6 @@ QString MarbleLegendBrowser::generateSectionsHtml()
         // Well is like a block of data with rounded corners
         customLegendString += "<div class=\"well well-small well-legend\">";
 
-        customLegendString += "<h4 \
class=\"section-head\">"+section->heading()+"</h4>";  
         QString checkBoxString;
         if (section->checkable()) {
@@ -299,7 +298,7 @@ QString MarbleLegendBrowser::generateSectionsHtml()
              */
             if(section->radio()!="") {
                 checkBoxString = ""
-                        "<label class=\"radio\">"
+                        "<label class=\"section-head\">"
                         "<input type=\"radio\" "
                         "onchange=\"Marble.setRadioCheckedProperty(this.value, \
                this.name ,this.checked);\" " +
                         checked + " value=\"" + section->connectTo() + "\" name=\"" \
+ section->radio() + "\" /><span>" @@ -308,7 +307,7 @@ QString \
MarbleLegendBrowser::generateSectionsHtml()  
             } else {
                 checkBoxString = ""
-                        "<label class=\"checkbox\">"
+                        "<label class=\"section-head\">"
                         "<input type=\"checkbox\" "
                         "onchange=\"Marble.setCheckedProperty(this.value, \
this.checked);\" "+checked+" value=\"" + section->connectTo() + "\" name=\"" + \
section->connectTo() + "\" /><span>"  + section->heading() +
@@ -316,6 +315,9 @@ QString MarbleLegendBrowser::generateSectionsHtml()
 
             }
             customLegendString += checkBoxString;
+
+        } else {
+            customLegendString += "<h4 \
class=\"section-head\">"+section->heading()+"</h4>";  }
 
         foreach (const GeoSceneItem *item, section->items()) {


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

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