qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.61k stars 3.01k forks source link

Layer Properties Information tab - formatting problems #33862

Closed i-s-o closed 4 years ago

i-s-o commented 4 years ago

In the Layer Properties/Information dialog (QGIS 3.10 and 3.11, Windows 10),

image

Compare this to QGIS 3.4 image

How to Reproduce

  1. Download one of U.S. NOAA's RNCs (geo-referenced charts) in BSB format. I used this one.
  2. Unzip.
  3. Drag/drop the file 12323_1.KAP onto QGIS from the appropriate sub directory.
  4. Double-click the layer in the Layers panel.
  5. Click on the Information tab on the left.

Additional context For this specific file, I can go to Settings > Custom Projections > Format: WKT to get the full string, but it would be nicer if I can see (and copy) the string in the Properties dialog.

elpaso commented 4 years ago

@nyalldawson what's the reason for cutting CRS definition at 50 chars?

elpaso commented 4 years ago

@i-s-o I've made a few small adjustments to the look and feel only, mind giving them a test run when the build is done?

i-s-o commented 4 years ago

Sorry for responding late, I didn't have access to my dev-VM: I was only able to compile overnight.

The dialog looks much better now: image

Using 80% for the font size and a few more tweaks shown below make it even better in my opinion :). I haven't tested how these tweaks work on other platforms or other providers. image

--- a/src/core/qgsapplication.cpp
+++ b/src/core/qgsapplication.cpp
@@ -1434,20 +1434,19 @@ QString QgsApplication::reportStyleSheet( QgsApplication::StyleSheetType styleSh
                    "}"
                    "table.tabular-view, table.list-view { "
                    "   border-collapse: collapse;"
-                   "   table-layout:fixed;"
                    "   width: 100% !important;"
+                   "   font-size: 80%;"
                    "}"
                    // Override
                    "h1 { "
                    "   line-height: inherit;"
                    "}"
                    "td, th {"
-                   "   word-wrap: break-word; "
                    "   vertical-align: top;"
                    "}"
                    // Set first column width
                    ".list-view th:first-child, .list-view td:first-child {"
-                   "   width: 15%;"
+                   "   white-space: nowrap;"
                    "}"
                    ".list-view.highlight { "
                    "   padding-left: inherit; "
elpaso commented 4 years ago

@i-s-o your version also looks nice, can you make a PR? Going to "actions" on your branch (top menu) you will also find a windows build that you can use for windows testing.

i-s-o commented 4 years ago

Ok, I will submit a PR later tonight.

nyalldawson commented 4 years ago

Custom CRS truncation is still an open issue