Bug 157531 - some graphical glitches in the UI
Summary: some graphical glitches in the UI
Status: RESOLVED FIXED
Alias: None
Product: konquest
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Pierre Ducroquet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-09 16:27 UTC by Majin Sniper
Modified: 2008-02-09 21:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot 1 (136.12 KB, image/png)
2008-02-09 16:29 UTC, Majin Sniper
Details
Screenshot 2 (135.65 KB, image/png)
2008-02-09 16:30 UTC, Majin Sniper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Majin Sniper 2008-02-09 16:27:45 UTC
Version:           2.0 (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.1.2 
OS:                Linux

When selecting a planet, then the target, the textbox to enter the number of ships to send appears. This box seems to be a pixel higher than the space used for the top bar before (see screenshot).
Could be a result of my font setting, maybe with other sizes it doesn't happen.
The problem is that it looks inconsistent, when the bar size changes and the whole window contents a re-rendered. This includes the background svg, which is really slow and look strange.
When the textbox disappears, the same effect happens the other way around. Maybe its possible to calculate the height of the textbox before the bar is first drawn or something like that.

The Playername is not colored when asking for the number of ships (see second screenshot).

Additionally the colored background of the planets owned by the players is inaccurate. They are sometimes overlapping the grid, sometimes not. In the second screenshot the background the yellow ¨B¨ planet covers all grid lines, the blue ¨A¨ none.
In the first one, the blue covers the bottom and top line, the yellow the right and left.
Comment 1 Majin Sniper 2008-02-09 16:29:35 UTC
Created attachment 23503 [details]
Screenshot 1

Bar without textbox, yellow background overlapping the grid horizontally.
Comment 2 Majin Sniper 2008-02-09 16:30:54 UTC
Created attachment 23504 [details]
Screenshot 2

Bar with textbox, blue box inside grid, yellow box fully overlapping, ¨Player
1¨ not colored.
Comment 3 Pierre Ducroquet 2008-02-09 17:46:28 UTC
I've got a fix for the colored label in my local copy, but I'll try fix the other problems before commiting. And it's gonna be quite hard. Konquest is using reals for the coordinates actually, and the problems you can see are rounding problems... If only screens could understand what a half pixel is... :)
Comment 4 Pierre Ducroquet 2008-02-09 18:22:17 UTC
Sorry, I can't fix the bug.
I fixed the label color bug easily (commit 772891, backport to KDE4.0 coming soon), but the coordinates problem has no fix.
It's quite easy to understand. Say you have 16x16 sectors on the map. Say your map is 333x333 pixels on screen.
Ideally, the sector size would be 20.8125 pixels. But it's impossible, so it's rounded.
But when it's rounded, there is a problem : if it's rounded to 21 pixels, you don't have enough space on screen (or sectors will have to overlay), and if it's rounded to 20 pixels, there will be some space between some sectors or under/above the map.
In both case, it's worse than what we have so far :/
I could hide the bug by removing the colored background on planets and instead do some effects on the planet icon itself, but I don't think it's worth it...

So I mark this bug as fixed, because everything fixable has been fixed, and the unfixable problems are just waiting for screens understanding what floating point pixels are...
Comment 5 Pierre Ducroquet 2008-02-09 18:26:54 UTC
(By the way, thanks for the bug reports)
Comment 6 Majin Sniper 2008-02-09 19:22:21 UTC
I think bug reporting is the least I can do :-).

What was the most important part for me is the problem with the resizing of the top bar, when the textbox is shown. The re-rendering of the background svg is really slow, when the game is running in a maximised window here and seems not to be fixed :-/.

I get the problem with the colored backgrounds of the planets. Maybe simply redrawing the grid around the planet would make it look a bit nicer?

Thanks for the very fast response :)
Comment 7 Pierre Ducroquet 2008-02-09 19:51:46 UTC
Please, next time try to split your reports in different issues, this way nothing will be lost...
I've got a small idea to fix the top bar issue : instead of having the ship count "blinking" (and creating a serious slowness sometimes), I'll enable/disable it as needed...
I'm having a weird issue so far with this change, but speed is much better as there is no more resizing of the whole area.
Comment 8 Pierre Ducroquet 2008-02-09 21:03:39 UTC
SVN commit 772948 by ducroquet:

Additionnal fix for bug 157531.
Remove the top bar resizing issue : now, instead of having a disappearing line edit (and a lot of resizes because of this), we use setEnabled(true/false) on the line edit.
It means much improved performances, no more bad looking resizes/repaints... Only good things.

BUG: 157531



 M  +0 -4      gamelogic.cc  
 M  +9 -9      gameview.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=772948