-
Clarence Dang authored
* Toolbar work: Tool Box & Color Tool Bar - Change from KToolBar to QDockWidget base - Nice side-effect: kpColorToolBar gets a QDockWidget resize grip - Lets us use QMainWindow::setCorner() so that Tool Box can take all the vertical space, since it can be quite tall with all its tool option widgets - Prevents KMainWindow from managing tool bar position so that we can force toolbars to be in a default and fixed place - this works around all the current quirks (due to the effects of QToolBar::setOrientation() no longer being virtual -- though, I actually saw an orientationChanged() signal now -- and probably other reasons): 1. Toolbars staying on top of even non-KolourPaint windows when KolourPaint is not the foreground window 2. Not being dockable when undocked - kpColorToolBar: use proper QSpacerItem instead of a fake widget (this looks better on e.g. Keramik style) - For component widgets, make them all do the following to avoid Qt layout oddities: 1. setSizePolicy() themselves, rather than nobody doing it or leaving it up to the users 2. Use setMinimumSize() instead of setFixedSize() and also don't use QSizePolicy::Fixed (don't know why this is required) * Color editing work - Split queryClose() into queryCloseDocument() and new queryCloseColors() - Start fix reloading and modified-state to work (regarding modified state, what is missing is drag-and-drop affecting it and a lot of testing) - kpColorCollection - Introduce openKDE() method to replace ctor functionality and allow error-handling - Add "showOverwritePrompt" argument to saveAs() - Rename save() to saveKDE() - kpColorCells - Add colorCollection() and saveColorCollection() - Tweak ::Palette{Column,Rows}() - When there are >= 3 rows, reduce the heights of each cell only -- not the width -- and only to 17, not to 13 (so you can fit 3 larger rows, not 4 smaller ones; height of all the cells is 52) - Clicking no longer takes tab focus away from main view Testcase: When a text box is active, clicking to change the background color should not move the keyboard focus away from the text box. * kpColorPalette - Add buttons to resize the color palette (TODO: revert this straight away since kpColorToolBar being QDockWidget already gives us a resize grip, that is more intuitive) - Make sure kpColorCells are horizontally centered inside the scrollarea * Documentation - Set target freeze date as Oct 21 - Mark clearly as BETA - Document toolbar regressions * Style, +/- debug svn path=/trunk/KDE/kdegraphics/kolourpaint/; revision=715735
4ca41031