[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kviewshell/shell
From: Wilfried Huss <Wilfried.Huss () gmx ! at>
Date: 2006-10-19 19:31:45
Message-ID: 1161286305.559248.20907.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 597260 by whuss:
Port of commit 596871:
Make searching work better for rotated viewmodes.
M +19 -1 pageView.cpp
--- trunk/KDE/kdegraphics/kviewshell/shell/pageView.cpp #597259:597260
@@ -1038,8 +1038,26 @@
}
}
- unsigned int y = pageData->textBoxList[selection.getSelectedTextStart()].box.top();
+ QRect box = pageData->textBoxList[selection.getSelectedTextStart()].box;
+ unsigned int y = 0;
+
+ switch (dataModel->preferences()->rotation())
+ {
+ case KVSPrefs::EnumRotation::Landscape:
+ y = box.left();
+ break;
+ case KVSPrefs::EnumRotation::Upsidedown:
+ y = pageCache->sizeOfPageInPixel(selection.getPageNumber()).height() - box.bottom();
+ break;
+ case KVSPrefs::EnumRotation::Seascape:
+ y = pageCache->sizeOfPageInPixel(selection.getPageNumber()).width() - box.right();
+ break;
+ case KVSPrefs::EnumRotation::Portrait:
+ default:
+ y = box.top();
+ }
+
Length l;
l.setLength_in_pixel(y, dataModel->resolution());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic