Source files are no longer separated by UI and non-UI and similar,
but only by their build target.
* ui/ -> part/
* Move all source files from conf/ to part/
* Keep config skeleton definitions in conf/, needed for the mobile target too
* Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/
* ui/data/icons/ -> icons/
* Move /part.cpp, /part.rc and similar files to part/
* Adapt include paths in source files
* Adapt CMakeLists.txt files (in / and in subdirectories)
* Adapt /Messages.sh
And by that it means giving the focus to the pageview which is most of
the fimes what we want. One could argue that if i had the focus on the
searchbar we should restore the focus there, but that makes not much
sense to me, since each tab is it's own world, at most one could say,
let's remember where the focus was in that tab the last time it was
focused and restore it there, but it seems a bit convoluted.
To be able of setting the focus to the pageview from the shell we need
to set up some focus proxies, so that part->widget (which is the sidebar)
ends up giving the focus to the pageview, which is what makes sense if
someone says "you part, set yourself the focus"
BUGS: 428257
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \;
If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
Okular's sidebar vertical view chooser toolbar suffers from a few issues:
* It's a nonstandard UI not used for category choosers in other pieces of KDE software,
and not used in other FOSS document readers
* What is shown and what is hidden is simultaneously too configurable while still not
offering the desirable UI common to other programs (i.e. no visible category chooser,
but a sidebar capable of displaying thumbnails, table of contents, search results, etc.)
* With labels on it takes up quite a bit of horizontal space, while with labels off, the
categories are less than clear
* UX is kind of clunky with nonstandard behaviors (e.g. clicking on the current category
to hide that category's view while keeping the view chooser visible, showing mostly
disabled items)
* It's made with custom painting code, which reduces maintainability and introduces bugs
(e.g. https://bugs.kde.org/show_bug.cgi?id=408190)
This patch removes the vertical category chooser entirely and replaces it with a tabbed
view on the top of the sidebar itself. The tabs are icons-only and have large icons. A
button is added on the left side of the default toolbar to quickly hide or show the
sidebar. In order to make room for the new button, the Previous and Next buttons on the
toolbar are removed, as previous/next buttons are already present on the Page Bar on the
bottom of the window so there's no need to duplicate this functionality. This improves
the UX, fixes a variety of bugs, and deletes a lot of custom code of dubious long-term
maintainability.

BUG: 213508
BUG: 334441
BUG: 344599
BUG: 408190
CCBUG: 335189
FIXED-IN: 1.11.0
CHANGELOG: The sidebar can now be easily shown or hidden with a toolbar button, and the category chooser no longer takes up so much space
Summary:
Now //fontBoundaries// always has smaller width than //boundingRect// from
```
void QPainter::drawText(const QRect &rectangle, int flags, const QString &text, QRect *boundingRect = nullptr)
```
which is required to enclose the whole text. The difference is only several pixels, but sometimes it can cause visual problems. You can see the sidebar without and with this patch in Russian language with Noto Sans 10pt font on a picture below.
{F7177644}
Now the first and the last symbols are fully visible.
Reviewers: #okular
Subscribers: okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D23012
Summary:
BUG: 382139
Previously these labels were white-on-light-blue with light themes; now they use the correct theme color property, and become black appropriately.
Test Plan:
Tested on KDE Neon (dev unstable). Verified that with the default Breeze color scheme, tab text is more readable when hovered over and then active but not in focus. See before and after:
{F3909142}
{F3909143}
Also tested these changes with all standard color schemes as well as the Oxygen theme to make sure that there were no visual regressions.
Reviewers: aacid, #okular, #kde_applications, broulik, sander, rkflx
Reviewed By: aacid, #okular, #kde_applications, rkflx
Subscribers: rkflx
Tags: #okular
Differential Revision: https://phabricator.kde.org/D7793
For reference, not even Konqueror uses the toolBarFont() for its
sidebar.
In fact, this seems to be the only usage of toolBarFont() I could find
in any KDE application.
Certain KDE color schemes have Window Background and View Text
not contrasting, which causes invisible icon labels when using
QPalette::Text on QPalette::Base. An example is the default
color scheme in openSUSE 12.3.
Thanks to Will Stephenson for noticing.
CCMAIL:wstephenson@kde.org
It turns out that the Places sidebar in Dolphin suffers from
the same bug, so a similar change should be done there. Frank?
CCMAIL:frank78ac@googlemail.com
Should never happen, but as it is the "main" widget of the part it might end up there if someone just says part->mainwidget->setfocus or something like that
At least this way the focus does not go down the drain and ends up in the sidebar list, which is not optimal but is better than getting the keyboard focus lost
forwardport r1185628 okular/branches/KDE/4.5/kdegraphics/okular/ui/sidebar.cpp: no need to look for a new current item if the sidebar is not even shown
svn path=/trunk/KDE/kdegraphics/okular/; revision=1185629
Make sure that setting the toc to be the current index does not break sidebar
visibility
Make Sidebar::isSidebarVisible symmetric with Sidebar::setSidebarVisibility
If showing the container make sure the list is also shown
svn path=/trunk/KDE/kdegraphics/okular/; revision=1152385