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

List:       kde-commits
Subject:    [marble] /: legend: simplify styling and correct map themes
From:       Thibaut Gridel <tgridel () free ! fr>
Date:       2014-01-04 21:43:01
Message-ID: E1VzYzl-0003y0-H4 () scm ! kde ! org
[Download RAW message or body]

Git commit 0f959a6d118413d778f35d1b92a77b39375c9a2d by Thibaut Gridel.
Committed on 04/01/2014 at 19:04.
Pushed by tgridel into branch 'master'.

legend: simplify styling and correct map themes

M  +35   -0    data/legend.css
M  +1    -6    data/legend.html
M  +2    -6    data/maps/earth/openstreetmap/legend.html
M  +2    -6    data/maps/earth/schagen1689/legend.html
M  +6    -7    data/maps/moon/clementine/legend.html
M  +0    -35   src/lib/marble/MarbleLegendBrowser.cpp

http://commits.kde.org/marble/0f959a6d118413d778f35d1b92a77b39375c9a2d

diff --git a/data/legend.css b/data/legend.css
index 9901e07..a526d04 100644
--- a/data/legend.css
+++ b/data/legend.css
@@ -15,4 +15,39 @@ body
 {
   background: #ffffff;
   color: black
+  padding: 10px;
+}
+
+label span {
+   line-height: 30px;
+   font-weight: 600;
+}
+
+label input {
+   margin-right: 5px!important;
+}
+
+.well-legend {
+   background-color: #fcffdb;
+   padding-top: 10px;
+   padding-bottom: 5px;
+
+}
+
+.well-legend .section-head {
+   color: #b3925d!important;
+}
+
+.legend-entry {
+   margin-bottom: -10px!important;
+}
+
+.legend-entry .image-pic {
+   float: left;
+   margin-right: 20px;
+   margin-top: 3px;
+}
+
+.legend-entry .notation {
+   line-height: 23px;
 }
diff --git a/data/legend.html b/data/legend.html
index b4b3b4b..bb0ca17 100644
--- a/data/legend.html
+++ b/data/legend.html
@@ -2,13 +2,8 @@
 <html>
 <head>
   <title>Marble: Legend</title>
-  <link href="legend.css" rel="stylesheet" type="text/css" />
   %!{bootstrap}%
-  <style>
-    body {
-        padding: 10px;
-    }
-  </style>
+  <link href="legend.css" rel="stylesheet" type="text/css" />
 </head>
 <body onload="1">
 
diff --git a/data/maps/earth/openstreetmap/legend.html b/data/maps/earth/openstreetmap/legend.html
index 5c0f2e1..783e94c 100644
--- a/data/maps/earth/openstreetmap/legend.html
+++ b/data/maps/earth/openstreetmap/legend.html
@@ -2,13 +2,8 @@
 <html>
 <head>
   <title>Marble: Legend</title>
-  <link href="legend.css" rel="stylesheet" type="text/css" />
   %!{bootstrap}%
-  <style>
-    body {
-        padding: 10px;
-    }
-  </style>
+  <link href="../../../legend.css" rel="stylesheet" type="text/css" />
 </head>
 <body onload="1">
 
@@ -22,3 +17,4 @@
 
 <br>
 </body>
+</html>
diff --git a/data/maps/earth/schagen1689/legend.html b/data/maps/earth/schagen1689/legend.html
index 5270d1c..43d219a 100644
--- a/data/maps/earth/schagen1689/legend.html
+++ b/data/maps/earth/schagen1689/legend.html
@@ -2,15 +2,11 @@
 <html>
 <head>
   <title>Marble: Legend</title>
-  <link href="legend.css" rel="stylesheet" type="text/css" />
   %!{bootstrap}%
-  <style>
-    body {
-        padding: 10px;
-    }
-  </style>
+  <link href="../../../legend.css" rel="stylesheet" type="text/css" />
 </head>
 <body onload="1">
+
 <center>
     <img class="img-polaroid" src="./legend/schagen_title.png" />
 </center>
diff --git a/data/maps/moon/clementine/legend.html b/data/maps/moon/clementine/legend.html
index aa02426..783e94c 100644
--- a/data/maps/moon/clementine/legend.html
+++ b/data/maps/moon/clementine/legend.html
@@ -1,13 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
+<!DOCTYPE html>
+<html>
 <head>
   <title>Marble: Legend</title>
-  <link href="legend.css" rel="stylesheet" type="text/css" />
+  %!{bootstrap}%
+  <link href="../../../legend.css" rel="stylesheet" type="text/css" />
 </head>
-<body>
+<body onload="1">
 
 <!-- The following comment gives a hint to the MarbleLegendBrowser where further 
      legend items which get generated from DGML should get inserted.
@@ -19,3 +17,4 @@
 
 <br>
 </body>
+</html>
diff --git a/src/lib/marble/MarbleLegendBrowser.cpp b/src/lib/marble/MarbleLegendBrowser.cpp
index f2daf03..b160272 100644
--- a/src/lib/marble/MarbleLegendBrowser.cpp
+++ b/src/lib/marble/MarbleLegendBrowser.cpp
@@ -277,41 +277,6 @@ QString MarbleLegendBrowser::generateSectionsHtml()
 
     d->m_symbolMap.clear();
 
-    /* This CSS code is required to style the following HTML code
-     * P.S. It use bootstrap also, so we don't need a lot of style here
-     */
-    QString bitStyle = "<style>"
-            ".well-legend {"
-            "   background-color: #fcffdb;"
-            "   padding-top: 10px;"
-            "   padding-bottom: 5px;"
-            ""
-            "}"
-            ".legend-entry {"
-            "   margin-bottom: -10px!important;"
-            "}"
-            ".well-legend .section-head {"
-            "   color: #b3925d!important;"
-            "}"
-            ".legend-entry .image-pic {"
-            "   float: left;"
-            "   margin-right: 20px;"
-            "   margin-top: 3px;"
-            "}"
-            ".legend-entry .notation {"
-            "   line-height: 23px;"
-            "}"
-            "label span {"
-            "   line-height: 30px;"
-            "   font-weight: 600;"
-            "}"
-            "label input {"
-            "   margin-right: 5px!important;"
-            "}"
-            "</style>";
-
-    customLegendString += bitStyle;
-
     /* Okay, if you are reading it now, be ready for hell!
      * We can't optimize this part of Legend Browser, but we will
      * do it, anyway. It's complicated a lot, the most important

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

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