krayon commit update and gui suggestions
John Califf
jcaliff@compuzone.net
Tue, 12 Dec 2000 00:36:11 -0500
This is an update on the latest changes to krayon and on a proposal that
may make those who want toolbars instead of tabs happy while also using
tabs for the multiple images in the main workspace.
There have been many cosmetic improvements such as assignment of icons
for everything we now have that should use icons, more tools, and a few
fixes to the gui. The crash when closing a split view has been fixed
(it was related to toolbar placement). Also, several new classes. One
for selections and another for a painter. The painter allows use of all
the Qt drawing classes for tools where that would make more sense than
doing them from scratch. For example, lines, circles, polylines, text,
fancy inclined text, etc. How this works is that the graphic is
simultaneous drawn on the canvas the user "sees" - and on an transparent
offscreen pixmap. What is drawn on the canvas is never retained with
the krayon image normally. For example selection outlines go away when
you scroll or perform another op. However, with these qt based tools
the graphic is then pasted from the offscreen pixmap which has a
transparent background (a pixmap is also a paint device to Qt) into a
krayon layer after the operation is finished, blending in with what's
already in that layer. These operatios are usually performed in discrete
steps so deciding when to "commit" the drawing is easy. It is then
retained with the layer in its channel data and can be further
manipulated with native krayon tools (blending, selections, separating
by color, etc).
Most of our "painterly" tools based on layers, brushes, and blending are
custom built and don't use Qt. But some, the "hard" tools like
geometric shapes and text, are more suitable to Qt and it would take
years to duplicate them with custom code.
In other news, we now have a bucket fill tool, which is usable but needs
a little more work. The pippette or dropper tool is now functional.
Selections work better and "cut" now cuts the selected area accurately -
it was off a little in the last commit.
Regarding the gui, after much discussion by others in another thread I
am now leaning towards replacing the tab buttons in the sidebar - all of
them, with toolbars containing tool items (icons). When an item is
selected from an appropriate toolbar, then its action will display
appropriate content in the sidebar, filling the entire sidebar. These
toolbars would be like other koffice toolbars. Also, most tools will
need settings dialogs, and when a user right clicks on a particular tool
its settings interface would occupy the sidebar, and perhaps on a middle
click open a in a real dialog with the same content. In other words,
only one thing would occupy the sidebar at a time, except a small strip
across the top showing the current colors, current brush, etc. - which
is now placed in the middle of the sidebar. It should be at the top -
just a status indicator strip that also allow you to access some
things. Anything which could open in a dialog should also be able to
open in the sidebar area. This is easy to accomplish as each can have a
container widget which can be parented either by a dialog or the sidebar
as the user chooses. Such an approach will please those who want
separate windows or dialogs and those who like the sidebar approach with
little extra work. (Note that the sidebar can be completely hidden at
any time and unhidden). We need a toolbar item for hiding/unhiding
because it will be used a lot. Currently you can do this only from the
"settings" menu.
Tabs are needed for accessing the multiple images in the main workspace
for many reasons. You never know in advance how many images you will
add so toolbars with a fixed set of items to choose from are not
feasible. Also, the tabs with the names of the images look nicer and
take less room than a separate toolbar for each image (yuck!) and are
more like sheets of paper you can overlay. Like a real artist would
use.
Well, I hope this is long enough for you, but it may encourage someone
else to help out with the coding as there is a lot yet to do. I am
behind on my email again, working backwards from today's mail to where I
left off a few days ago. Any constructive mail will be answered,
eventually. Krayon is moving right along slowly but surely!
John