Bug 331610 - canvas sides rulers show wrong pixel values scale depending on document ppi
Summary: canvas sides rulers show wrong pixel values scale depending on document ppi
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 2.8 Beta
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 11:55 UTC by animtim
Modified: 2014-07-24 15:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description animtim 2014-02-28 11:55:05 UTC
The canvas rulers (from menu View->show rulers) show proper document pixel values only if the document is set to 72ppi.  With other ppi values, the displayed numbers on the rulers are wrong.
(Ex: with a file of 4800px width at 72ppi, the ruler shows width values up to 4800, while with same pixel size but at 600ppi, the ruler shows width values only up to ~576 .. )

Reproducible: Always
Comment 1 Dmitry Kazakov 2014-03-11 10:09:36 UTC
The rulers are measured in 'pt' values. One can switch it into other values, but 'px' is not available. And it doesn't work when enabled in a hardcoded way. So it is confirmed.
Comment 2 Dmitry Kazakov 2014-03-11 11:28:16 UTC
Git commit 099ba48a183dcc0546fa0d8c42a7d94eb94029a5 by Dmitry Kazakov.
Committed on 11/03/2014 at 11:19.
Pushed by dkazakov into branch 'master'.

Make Krita show rulers in Pixel unit (now activated by default)

You can always switch to other units by right-clicking on the ruler

M  +13   -6    krita/ui/kis_zoom_manager.cc
M  +2    -0    krita/ui/kis_zoom_manager.h
M  +2    -2    libs/main/KoView.cpp
M  +1    -1    libs/main/KoView.h
M  +7    -5    libs/main/KoView_p.h

http://commits.kde.org/calligra/099ba48a183dcc0546fa0d8c42a7d94eb94029a5
Comment 3 animtim 2014-03-11 11:48:23 UTC
Thanks, the fix is almost working, only problem is it doesn't initialize right.
That is after creating a document, pixel unit is selected but it still shows wrong value like before, only if I switch to another unit then back to pixel it shows right values.
Comment 4 Sven Langkamp 2014-07-02 16:51:16 UTC
Git commit 151af71e455f2f79e1a276df460ef04224e2ab5f by Sven Langkamp.
Committed on 02/07/2014 at 16:50.
Pushed by langkamp into branch 'master'.

initalize rulers with correct unit

M  +3    -0    krita/ui/kis_zoom_manager.cc

http://commits.kde.org/calligra/151af71e455f2f79e1a276df460ef04224e2ab5f
Comment 5 Halla Rempt 2014-07-24 15:41:53 UTC
Git commit 2d51b3df64dfe1c8af5a39f94b8b638379dca7d8 by Boudewijn Rempt, on behalf of Sven Langkamp.
Committed on 02/07/2014 at 16:50.
Pushed by rempt into branch 'calligra/2.8'.

initalize rulers with correct unit

M  +3    -0    krita/ui/kis_zoom_manager.cc

http://commits.kde.org/calligra/2d51b3df64dfe1c8af5a39f94b8b638379dca7d8