MantisBT - Doomseeker
View Issue Details
0003461DoomseekerUIpublic2018-08-24 01:292019-07-30 10:13
x86_64Debian GNU/Linuxbuster/sid
0003461: Right aligning decoration images/user roles (player slot styles) is done with a CustomItemDelegate hack
The issue related to this hack is probably best to be explained with a screenshot, attached.

For an introduction: Player slots are right-aligned in the server list view table ("Servers"). Some ancient code in Doomseeker handles this with CustomItemDelegate painting.

The width of player block slots is 168 px wide in this case (second column in the screenshot), or 24 players. The "bounding box" (for a lack of better word... the small border around it) for this is 289 px wide, both aligned to right. There is approximately 174 px of free space on the left side of that in the screenshot, which is not part of the bounding box that would normally fill the whole width of the selected column. Coincidentally, this free space happens to be the width of the player block slot plus margin/padding.

In other words, 2-player slots experience very wide "bounding box" while larger, up to 64-player slots receive very small ones (sometimes not visible) – the very reverse of what's intended, although full width would make more sense too. A server which cannot be reached (0 player slots, not shown in screenshot) has the full width, as expected.
To reproduce the effects similar to the one in the screenshot:

  1. (Make sure Doomseeker is built with a recent enough Qt, probably Qt5 at least.)
  2. Start Doomseeker.
  3. (If the Servers list is not visible for whatever the reason, right click in the top navigation or main toolbar and check "Servers". This should not happen, as it should always be enabled and normally cannot be unchecked.)
  4. Click on the players column for any server received from a master server (Internet connection), or a Custom Server (any, added from configuration). The server must be reachable.
This is a hack from a very long ago (2009–2011 or earlier).

Quote from src/core/gui/widgets/serverlistview.cpp
// If the row is selected and we are using the right aligned feature
// we must now redraw the decoration.  The rectangle that was used
// in the previous function will cause the image to clip.
// The only other way I can think of for fixing that problem would
// be to completely rewrite this class, which I really don't want
// to do.

Qt 5.11 used in the screenshot. Found in Doomseeker 1.1 and 1.2~beta-180821-1617M.
No tags attached.
related to 0003462confirmed  Right aligned player slots are missing 3 px right margin in server list view's column 
related to 0003677acknowledged  Is focus rectangle in the server table needed? 
png 3461.png (7,933) 2018-08-24 01:30

png 3461-hint.png (13,059) 2018-08-24 02:16

png 3461-hint-2.png (17,900) 2018-08-24 02:24
Issue History
2018-08-24 01:29WubTheCaptainNew Issue
2018-08-24 01:30WubTheCaptainFile Added: 3461.png
2018-08-24 01:30WubTheCaptainAdditional Information Updatedbug_revision_view_page.php?rev_id=11660#r11660
2018-08-24 01:32WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11662#r11662
2018-08-24 01:35WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11663#r11663
2018-08-24 01:38WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11664#r11664
2018-08-24 01:38WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11665#r11665
2018-08-24 01:40WubTheCaptainAdditional Information Updatedbug_revision_view_page.php?rev_id=11666#r11666
2018-08-24 02:15WubTheCaptainFile Added: 3461-hint.png
2018-08-24 02:15WubTheCaptainFile Deleted: 3461-hint.png
2018-08-24 02:16WubTheCaptainFile Added: 3461-hint.png
2018-08-24 02:17WubTheCaptainNote Added: 0019393
2018-08-24 02:17WubTheCaptainNote Edited: 0019393bug_revision_view_page.php?bugnote_id=19393#r11668
2018-08-24 02:24WubTheCaptainFile Added: 3461-hint-2.png
2018-08-24 02:26WubTheCaptainNote Edited: 0019393bug_revision_view_page.php?bugnote_id=19393#r11669
2018-08-24 02:26WubTheCaptainNote Edited: 0019393bug_revision_view_page.php?bugnote_id=19393#r11670
2018-08-24 02:33WubTheCaptainNote Edited: 0019393bug_revision_view_page.php?bugnote_id=19393#r11671
2018-08-24 02:39WubTheCaptainNote Added: 0019394
2018-08-24 02:41WubTheCaptainNote Edited: 0019394bug_revision_view_page.php?bugnote_id=19394#r11673
2018-08-24 02:48WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11674#r11674
2018-08-24 02:52WubTheCaptainRelationship addedrelated to 0003462
2018-10-05 06:36WubTheCaptainPrioritynormal => low
2018-12-04 00:40WubTheCaptainCategoryBug => UI
2019-04-19 18:31WubTheCaptainNote Added: 0020508
2019-04-20 12:12Pol MNote Added: 0020518
2019-04-20 12:12Pol MAssigned To => Pol M
2019-04-20 12:12Pol MStatusnew => acknowledged
2019-04-20 12:12Pol MAssigned ToPol M =>
2019-04-20 12:12Pol MStatusacknowledged => confirmed
2019-06-05 14:23Pol MNote Edited: 0020518bug_revision_view_page.php?bugnote_id=20518#r12616
2019-06-05 14:41Pol MNote Edited: 0020518bug_revision_view_page.php?bugnote_id=20518#r12621
2019-06-05 14:41Pol MNote Edited: 0020518bug_revision_view_page.php?bugnote_id=20518#r12622
2019-06-25 21:43ZalewaNote Added: 0020840
2019-06-25 21:43ZalewaAssigned To => Zalewa
2019-06-25 21:43ZalewaStatusconfirmed => needs review
2019-06-26 02:55WubTheCaptainTarget Version => 1.3
2019-07-02 21:26ZalewaStatusneeds review => needs testing
2019-07-12 12:14Pol MNote Added: 0020871
2019-07-12 12:14Pol MStatusneeds testing => assigned
2019-07-12 18:19WubTheCaptainNote Added: 0020873
2019-07-12 18:34WubTheCaptainNote Added: 0020875
2019-07-12 20:22ZalewaNote Added: 0020876
2019-07-12 20:22ZalewaStatusassigned => resolved
2019-07-12 20:22ZalewaFixed in Version => 1.3
2019-07-12 20:22ZalewaResolutionopen => fixed
2019-07-12 20:23ZalewaNote Edited: 0020876bug_revision_view_page.php?bugnote_id=20876#r12716
2019-07-12 20:23ZalewaRelationship addedrelated to 0003677
2019-07-30 10:13WubTheCaptainStatusresolved => closed

2018-08-24 02:17   
(edited on: 2018-08-24 02:33)
For better accessibility, I've also attached a photo manipulation (3461-hint.png) which displays the "bounding box" with a gradient of stripes.

3461-hint-2.png shows the left margin of the bounding box is the same as the width of the slots (as if they were left-aligned).

For clarification, the stripes should be the full width of the column but this hack paints them wrongly.

2018-08-24 02:39   
(edited on: 2018-08-24 02:41)
Also there's no margin whatsoever on the right side of slots due to this hack (?). Expected 3 px.

2019-04-19 18:31   
This issue has not seen activity in a while; can anyone confirm or acknowledge this issue?
Pol M   
2019-04-20 12:12   
(edited on: 2019-06-05 14:41)
Can confirm the issue in my Arch machine (there are themes of qt5 that do not show the box), and I'm quite sure that I also saw this on Windows.
This box is actually caused by the free space, it works kinda like this: initially the columns are left aligned, causing an empty box to appear on the right. When the player slots are moved to the right, the empty box stays there.

Why are the slots right aligned? I'm asking because looking at the problem I'm not even sure how it should be fixed. If it is not possible to solve, maybe we will have to determine what we prefer: the alignment or the slightly unpleasant graphical bug.

2019-06-25 21:43   
CustomItemDelegate hack has been hacked even more to not show the focus rectangle in columns for the game and for players. Here's the commit that does that: [^]

To be frank I'm thinking that this focus rectangle is useless in this whole table so perhaps this hacky hack should apply to all the columns?
Pol M   
2019-07-12 12:14   
Tested, it works pretty well, the rectangle no longer appears.

Quote from Zalewa

To be frank I'm thinking that this focus rectangle is useless in this whole table so perhaps this hacky hack should apply to all the columns?

I'd say that for consistency this should be desired. I'll move this to assigned.
2019-07-12 18:19   
Quote from Pol M
I'd say that for consistency this should be desired. I'll move this to assigned.

The issue in OP is either unresolved (we still use the hack) or resolved (a working workaround was committed). I'd prefer to leave this issue as resolved in such case.
2019-07-12 18:34   
In a theorized big picture, I would be curious to know how the player slots are aligned in right-to-left languages (no localizations implemented yet).
2019-07-12 20:22   
(edited on: 2019-07-12 20:23)
I'll agree with Wub here that this matter is resolved. The matter of having the focus rectangle in server table at all is now in ticket 0003677.

As far as RTL goes - I've no idea.