History log of /haiku/src/apps/icon-o-matic/gui/GradientControl.cpp
Revision Date Author Comments
# be84a3d6 23-Dec-2023 John Scipione <jscipione@gmail.com>

Icon-O-Matic: Minor changes and style fixes to list views

Not 100% style changes but the functional changes are very minor.
This is to create a clean base on which to make my other changes.

Remove commented out code. Remove LIB_LAYOUT.

Replace calls to _SetDropAnticipationRect with assignment to fDropRect,
make all methods protected. Rename _SetDropAnticipationRect to
InvalidateDropRect and remove _'s from methods.

Some extra NULL checks are included in ShapeListView and it has been
de-indented.

omit .0 where it doesn't matter.
rename r to rect
tab style on classes
use SetHighUIColor/SetLowUIColor where appropriate

Change-Id: Ife514452dc6ea5d5cd75ccba2fd13d46d69bcffc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7214
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 5b5b829f 15-Aug-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Let GradientControl shrink further

This allows Icon-O-Matic to be shrunk further horizontally.

Change-Id: Idd54a51dc0d20dcd981dc1ef10d0d5a7a78979cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6870
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 6da29a76 15-Aug-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Fix window resizing bug

Previously, the window could not go any smaller than the current size
after some changes were made to the icon such as adding a style.

Fixes #4711

Also cleans up some code style.

Change-Id: I4e7af98ac8afbea28a46d81b9de7aba6fc6c894a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6836
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 61ee19d1 10-Apr-2011 Stephan Aßmus <superstippi@gmx.de>

* A whole buch of refactoring and other changes to make Icon-O-Matic
a multi-document application. This is already more useful than
before, but will be even more useful once it is possible to copy
more types of objects to the system clipboard and paste them into
other open icons.
* Fixed wrong snapping menu item being marked when restoring settings
that enable a different snapping mode from the default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41212 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 64eb49fd 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

* Cleanup in the Gradient department. No fuctional change.
Renamed BGradient::color_step to BGradient::ColorStop
as it's called everywhere else. Also renamed BGradient::gradient_type
to just BGradient::Type. Renamed BGradient::Type() to GetType().
* Simplification of method names in Painter.cpp. Some not yet
complete and yet inactive code to accelerate vertical gradients
(bypassing AGG for this special case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52de6dce 08-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 991547ef 14-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e1ba39f 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* merged Icon-O-Matic from Ingos layout branch into trunk (r18134:18685)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61b0e9e3 12-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added a little bit of tracing to object destruction, since there
seems to be a problem when quitting the app
* added Undo/Redo commands for numerous operations
- (un)assigning VectorPaths to Shapes
- adding new VectorPaths
- removing VectorPaths
- adding Shapes
- transforming Shapes
- adding Styles
- changing Style color
* there was a mix up in classes inheriting from SimpleListView,
RemoveItemList() gives a list of item pointers, not indices
* GradientControl sent the focus notification to the window instead
of the set BHandler target
* StyleView takes care of transfering the current Style color or
the focused gradient stop color to the CurrentColor object, so
the current color of the SwatchGroup is synced
* small improvement to layout of SwatchGroup
* SwatchGroup no longer knows anything about a Style
* fixed syncing the global Selection to the listview selection
at least for ShapeListView
* implemented cloning Shapes
- added Transformer::Clone(VectorSource& source) to all Transformers
- ShapeListView uses this when dropping shapes with shift pressed
* updated NOTES
* added Transformable::matrix_size, so that "6" isn't hardcoded
everywhere (though it still is at most places)
* added listener interface to TransformBox, this is used by
the new TransformObjectsCommand, as long as the TransformBox still
exists, the command modifies the TransformBox transformation instead
of messing with the objects itself
* fixed hotspot size in TransformBox by using the zoom level of
the CanvasView
* TransformBox rotates/scales correctly around the visible pivot
* fixed TransformCommand toggling to transformation (the diff was bogus)
* Gradient doesn't trigger unnecessary notifications in SetColor()
* CanvasView doesn't eat keyboard events when the GradientControl or
one of the ListViews has focus (is a hack currently...)
* fixed bug in PropertyListView when it calls the PropertyChanged()
hook: because of the notification mechanism, the Properties might
be toast after the hook returns
* moved all GetProperty() implementations from headers into .cpp files



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2205ee09 10-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added GradientControl which can edit a Gradient
* filled out StyleView for configuring a Style
* added SetGradientCommand for undo/redo editing a
Gradient
* Style::SetGradient() doesn't assume ownership
of the Gradient passed in anymore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ee19d10fcc38e93a80a29b90efe6e4e15604df 10-Apr-2011 Stephan Aßmus <superstippi@gmx.de>

* A whole buch of refactoring and other changes to make Icon-O-Matic
a multi-document application. This is already more useful than
before, but will be even more useful once it is possible to copy
more types of objects to the system clipboard and paste them into
other open icons.
* Fixed wrong snapping menu item being marked when restoring settings
that enable a different snapping mode from the default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41212 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 64eb49fd247e510f572ead9f2fbec5b39acd3fe9 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

* Cleanup in the Gradient department. No fuctional change.
Renamed BGradient::color_step to BGradient::ColorStop
as it's called everywhere else. Also renamed BGradient::gradient_type
to just BGradient::Type. Renamed BGradient::Type() to GetType().
* Simplification of method names in Painter.cpp. Some not yet
complete and yet inactive code to accelerate vertical gradients
(bypassing AGG for this special case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52de6dce94e48d957a3bb96d6b256f45a953f4c2 08-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 991547ef6c1fca650f0fba855206296ef54bc441 14-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e1ba39f0440e200e30b6a648e70c3e8683dc5f7 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* merged Icon-O-Matic from Ingos layout branch into trunk (r18134:18685)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61b0e9e3149012ccbd48a10dcbc7f83600bb4769 12-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added a little bit of tracing to object destruction, since there
seems to be a problem when quitting the app
* added Undo/Redo commands for numerous operations
- (un)assigning VectorPaths to Shapes
- adding new VectorPaths
- removing VectorPaths
- adding Shapes
- transforming Shapes
- adding Styles
- changing Style color
* there was a mix up in classes inheriting from SimpleListView,
RemoveItemList() gives a list of item pointers, not indices
* GradientControl sent the focus notification to the window instead
of the set BHandler target
* StyleView takes care of transfering the current Style color or
the focused gradient stop color to the CurrentColor object, so
the current color of the SwatchGroup is synced
* small improvement to layout of SwatchGroup
* SwatchGroup no longer knows anything about a Style
* fixed syncing the global Selection to the listview selection
at least for ShapeListView
* implemented cloning Shapes
- added Transformer::Clone(VectorSource& source) to all Transformers
- ShapeListView uses this when dropping shapes with shift pressed
* updated NOTES
* added Transformable::matrix_size, so that "6" isn't hardcoded
everywhere (though it still is at most places)
* added listener interface to TransformBox, this is used by
the new TransformObjectsCommand, as long as the TransformBox still
exists, the command modifies the TransformBox transformation instead
of messing with the objects itself
* fixed hotspot size in TransformBox by using the zoom level of
the CanvasView
* TransformBox rotates/scales correctly around the visible pivot
* fixed TransformCommand toggling to transformation (the diff was bogus)
* Gradient doesn't trigger unnecessary notifications in SetColor()
* CanvasView doesn't eat keyboard events when the GradientControl or
one of the ListViews has focus (is a hack currently...)
* fixed bug in PropertyListView when it calls the PropertyChanged()
hook: because of the notification mechanism, the Properties might
be toast after the hook returns
* moved all GetProperty() implementations from headers into .cpp files



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2205ee09148c5472af4cecc2b4cc15a65d643c1d 10-Jul-2006 Stephan Aßmus <superstippi@gmx.de>

* added GradientControl which can edit a Gradient
* filled out StyleView for configuring a Style
* added SetGradientCommand for undo/redo editing a
Gradient
* Style::SetGradient() doesn't assume ownership
of the Gradient passed in anymore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18092 a95241bf-73f2-0310-859d-f6bbb57e9c96