Skip to content

TagSelectWidget: Change column width - #2338

Merged
dg0yt merged 4 commits into
OpenOrienteering:masterfrom
dl3sdo:tag-select-resize
Mar 16, 2025
Merged

TagSelectWidget: Change column width#2338
dg0yt merged 4 commits into
OpenOrienteering:masterfrom
dl3sdo:tag-select-resize

Conversation

@dl3sdo

Copy link
Copy Markdown
Member

The 'Find objects' dialog contains a table which is shown in the 'Query editor' view.
The 'Relation' and 'Comparision' columns were set up with a fixed width based on the width of the translated labels 'Relation' and 'Comparision'. The result looks good for English but not for other languages, e.g., German or Czech.
Set up both columns to automatically resize based on its contents.

@dl3sdo

Copy link
Copy Markdown
MemberAuthor

Example (Windows):
Previous_englishPrevious_german
Previous_czech
Czech: streching the window does not help either.

@dl3sdo
dl3sdo marked this pull request as draft February 21, 2025 21:31
@dl3sdo

Copy link
Copy Markdown
MemberAuthor

The first commit fixes the issue that the beginning of Key and Values fields may be hidden permanently.
However, there is a strange behaviour for the 'Relation' combo box:

22-02-_2025_13-29-04.mp4

@dg0yt

dg0yt commented Feb 22, 2025

Copy link
Copy Markdown
Member

What we have in master is that newly added lines look better than previously added lines.

You can test in plain English if temporarily shorten the source strings.

-	setHorizontalHeaderLabels(QStringList() << tr("Relation") << tr("Key") << tr("Comparison") << tr("Value"));+	setHorizontalHeaderLabels(QStringList() << tr("R") << tr("Key") << tr("C") << tr("Value"));

@dl3sdo

Copy link
Copy Markdown
MemberAuthor

I notice that this issue does not occur on my Linux development build (which is based on QT 5.15).
I wonder whether this is a problem of Windows or of QT 5.12 (which is used by our CI).

@dl3sdo
dl3sdoforce-pushed the tag-select-resize branch 2 times, most recently from 55ef84f to 4e67d1eCompareFebruary 23, 2025 18:20
The 'Find objects' dialog contains a table which is shown in the
'Query editor' view.
The 'Relation' and 'Comparision' labeled columns were set up with a
fixed width based on its translations. The result looks good for
English but not for other languages, e.g., German or Czech.
Set up both columns to automatically resize based on its contents.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dl3sdo
dl3sdo marked this pull request as ready for review February 24, 2025 18:41
@dl3sdo
dl3sdo requested a review from dg0ytMarch 6, 2025 20:33
@dl3sdo

Copy link
Copy Markdown
MemberAuthor

@dg0yt: thank you for refactoring the code. I tested it successfully under Windows.

@dg0yt
dg0yt merged commit 2a598df into OpenOrienteering:masterMar 16, 2025
@dg0ytdg0yt added this to the v0.9.6 milestone Mar 16, 2025
@dl3sdo
dl3sdo deleted the tag-select-resize branch March 16, 2025 19:01
lpechacek pushed a commit to lpechacek/mapper that referenced this pull request Oct 15, 2025
The 'Relation' and 'Comparison' columns must be wide enough
to hold the translated combobox items.
---------
Co-authored-by: Kai Pastor <dg0yt@darc.de>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dl3sdo@dg0yt