Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of tab distances #60098

Open
2 tasks done
cymed opened this issue Jan 9, 2025 · 0 comments
Open
2 tasks done

Behaviour of tab distances #60098

cymed opened this issue Jan 9, 2025 · 0 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Labeling Related to QGIS map labeling

Comments

@cymed
Copy link

cymed commented Jan 9, 2025

What is the bug or the crash?

Tab distances behave unexpectedly when combined with alignment or when there are multiple tabs in a row

Steps to reproduce the issue

Base for tests, no dynamic tab width from #59253:

format('<div style="font-weight: bold; font-size: 12px;">Reservoir %1	%2	m<sup>3</sup></div>
<div style="text-align:left;font-size: 11px;">Water level:	%3	masl</div>
<div style="text-align:left;font-size: 11px;">Chamber 1:	%4	m<sup>3</sup></div>
<div style="text-align:left;font-size: 11px;">Chamber 2:	%5	m<sup>3</sup></div>',
'Example',500,1234.56,200,300)

Example works as expected:
grafik

Adding two tabs in a row for formatting:

format('<div style="font-weight: bold; font-size: 12px;">Reservoir %1	%2	m<sup>3</sup></div>
<div style="text-align:left;font-size: 11px;">Water level:		%3	masl</div>
<div style="text-align:left;font-size: 11px;">Chamber 1:		 %4	m<sup>3</sup></div>
<div style="text-align:left;font-size: 11px;">Chamber 2:		%5	m<sup>3</sup></div>',
'Example',500,1234.56,200,300)

Result:
grafik

Altering text-align

format('<div style="font-weight: bold; font-size: 12px;">Reservoir %1	%2	m<sup>3</sup></div>
<div style="text-align:right;font-size: 11px;">Water level:	%3	masl</div>
<div style="text-align:right;font-size: 11px;">Chamber 1:	%4	m<sup>3</sup></div>
<div style="text-align:right;font-size: 11px;">Chamber 2:	%5	m<sup>3</sup></div>',
'Example',500,1234.56,200,300)

Result:
grafik

It seems that text-align and tabs are interfering

Versions

QGIS-Version 3.40.2-Bratislava
QGIS-Codeversion 14826ca
 
Bibliotheken
Qt-Version 5.15.13
Python-Version 3.12.8
GDAL-Version 3.9.3
PROJ-Version 9.5.0
EPSG-Registraturdatenbankversion v11.016 (2024-08-31)
GEOS-Version 3.13.0-CAPI-1.19.0
SQLite-Version 3.46.1
PDAL-Version 2.8.1
PostgreSQL-Client-Version 16.2
SpatiaLite-Version 5.1.0
QWT-Version 6.3.0
QScintilla2-Version 2.14.1
BS-Version Windows 11 Version 2009
 
Aktive Python-Erweiterungen
db_manager 0.1.20
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99

Bibliotheken
Qt-Version
5.15.13
Python-Version
3.12.8
GDAL-Version
3.9.3
PROJ-Version
9.5.0
EPSG-Registraturdatenbankversion
v11.016 (2024-08-31)
GEOS-Version
3.13.0-CAPI-1.19.0
SQLite-Version
3.46.1
PDAL-Version
2.8.1
PostgreSQL-Client-Version
16.2
SpatiaLite-Version
5.1.0
QWT-Version
6.3.0
QScintilla2-Version
2.14.1
BS-Version
Windows 11 Version 2009

Aktive Python-Erweiterungen
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@cymed cymed added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 9, 2025
@agiudiceandrea agiudiceandrea added the Labeling Related to QGIS map labeling label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Labeling Related to QGIS map labeling
Projects
None yet
Development

No branches or pull requests

2 participants