Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Revisions: Issue #3461 Back to Issue ]
Summary 0003461: Right aligning decoration images/user roles (player slot styles) is done with a CustomItemDelegate hack
Revision 2018-08-24 01:29 by WubTheCaptain
Additional Information This is a hack from a very long ago.

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.
Revision 2018-08-24 01:30 by WubTheCaptain
Additional Information This is a hack from a very long ago.

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.
Revision 2018-08-24 01:29 by WubTheCaptain
Description 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 padding – the very reverse of what's intended.

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). If we're concerned about the alignment of the bounding box but not the width, then that's wrong too. A server which cannot be reached (0 player slots) has the full width, as intended (not shown).
Revision 2018-08-24 01:32 by WubTheCaptain
Description 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 padding – the very reverse of what's intended.

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). A server which cannot be reached (0 player slots) has the full width, as intended (not shown).
Revision 2018-08-24 01:35 by WubTheCaptain
Description 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 – the very reverse of what's intended.

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). A server which cannot be reached (0 player slots) has the full width, as intended (not shown).
Revision 2018-08-24 01:38 by WubTheCaptain
Description 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 – the very reverse of what's intended.

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). A server which cannot be reached (0 player slots) has the full width, as expected (not shown).
Revision 2018-08-24 01:38 by WubTheCaptain
Description 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 – the very reverse of what's intended.

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). A server which cannot be reached (0 player slots, not shown in screenshot) has the full width, as expected.
Revision 2018-08-24 01:40 by WubTheCaptain
Additional Information 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.
Revision 2018-08-24 02:48 by WubTheCaptain
Description 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.






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker