History log of /haiku/src/preferences/appearance/APRView.h
Revision Date Author Comments
# 979a0bc4 21-Mar-2024 Augustin Cavalier <waddlesplash@gmail.com>

Appearance: Hide most colors by default and compute them automatically.

In the new "automatic" mode, the number of displayed colors
is just 3, as opposed to the full 38. Much more manageable!

The HSL routines added in this commit were derived from
https://gist.github.com/ciembor/1494530 which is itself derived
from the Wikipedia page describing HSL/HSV.

Part of #15543 and #11636.

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


# e88a89e6 04-Jul-2018 John Scipione <jscipione@gmail.com>

Appearance Prefs: drag and drop between ColorWhichItems

Fixes final piece of #8618

Already added support for list items to drag colors out and you can
drag and drop between the list items and preview. but, what was
missing was drag and drop between list items. Updated
ColorWhichListItem to also accept color drops through their
parent ColorWhichListView.

Also included some related style fixes, use B_RGB_COLOR_TYPE
constant in place of (type_code)'RGBC'. 80-char limit fixes.

Simplify similar code in ColorPreview class to parse out rgb_color
from message.

ColorPreview passes dropped color along to APRView

APRView no longer accepts color drops, this is handled by ListView
and ColorPreview now.

Consolidated "RGBColor" and "which" message name strings into
constants defined in defs.h.

Change-Id: I88ec2a4ffe077620ec4cc3b032196cbff0f09615


# f0650dc9 09-Dec-2015 looncraz <looncraz@looncraz.net>

preferences: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0023-0037 from looncraz, unmodified.


# 7ef12e5c 08-Apr-2013 John Scipione <jscipione@gmail.com>

Eliminated _UpdateControls(), some style fixes


# 2c765faf 23-Feb-2013 John Scipione <jscipione@gmail.com>

Rename ColorWell to ColorPreview in Appearance prefs.

No functional change intended.

I'd like to use the name "ColorWell" for a different type of
class eventually so I'm making room for it. ColorPreview is
arguably a better name for the class anyway.

Also did a style cleanup of the ColorWell => ColorPreview class at
the same time.


# 9ed32a43 26-Feb-2012 Stephan Aßmus <superstippi@gmx.de>

Embedded the Font into the Appearance Preflet

* Copied the essential parts from the Font preflet into the Appearance
preflet folder.
* Adopted these files to better direct where BMessage arrive and why.
The Font preflet just forwarded them from the BWindow handler,
which was quite messy.
* Embedded the Font preferences as another tab. The first one actually,
with the Decor settings also moved in front of the Anti-Aliasing tab.
* Refactored the Defaults and Revert button updates in the window code.
* AInclude all active settings tabs in the Defaults and Revert handling
for consistency. But eventually, the buttons should only affect the
currently visible page.


# 97510b03 30-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Introduce a new tab to the Appearance Preflet for Decorator
* Show Decorator information button
* Decorator changes happen in real time on click
* Remove *old* OpenBeOS Decerator selection code
* Still have a little cleanup todo
* Need to give a little focus on revert/default buttons
* Decerator test / screenshots?


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


# d96a7d59 21-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.
+alpha


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


# b46615c5 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


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


# faff99c0 20-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Use layout management for all of the window. Can be improved by making
the listview use all the available additional size. But works far better
than before.


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


# b3c05fb6 06-Sep-2008 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

* Remember changing the color of an ui_color.
* Simplified code a lot when doing that and removed lots of unused code.

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


# 59e13a3f 03-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
interface, the ones for the solid cover simply pass through the existing
methods, so only one subpixel blending function is left which does the actual
work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
implements subpixel anti-aliasing for any generic AGG vector pipelines. It
is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
rotated, sheared or big enough fonts) depending on the global subpixel
setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
to InterfaceDefs.cpp where other such functions live. They are not related
to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



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


# f6d52cb7 29-Feb-2008 Rene Gollent <anevilyak@gmail.com>

- Added operator = implementation to rgb_color for convenience.
- Major cleanup of Appearance prefs - colors are now dynamically
read from the app_server, and updating them also works, but
triggers a bug: the state of the current window somehow gets
confused, i.e. if I update the panel background color, for some
reason the color of the BButtons in the appearance pref change color
and also the textviews begin misbehaving. Have not yet tracked down
the cause of this, but newly created windows after making the change
do show up with the updated color and behave properly. Also vastly
simplified the pref and cleaned up some obsolete definitions.



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


# 5605e701 23-Feb-2007 DarkWyrm <darkwyrm@gmail.com>

Added a menu to allow the user to choose the decorator. Untested, but theoretically working. I'll be content with the user being able pick a decorator and tweak system colors for R1.


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


# 3d5da9f4 30-Oct-2006 DarkWyrm <darkwyrm@gmail.com>

Updated style to come pretty close to matching OT style guidelines


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


# a3b25e4f 30-Oct-2006 DarkWyrm <darkwyrm@gmail.com>

Serious simplification and retooling of Appearance app. Just system colors supported for now. Still not finished, but getting there.


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


# a10cf76e 24-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/prefs to "preferences", as the directory is usually called in BeOS.


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


# 7ef12e5cad734146b5690f3bb04bc260d598c1c9 08-Apr-2013 John Scipione <jscipione@gmail.com>

Eliminated _UpdateControls(), some style fixes


# 2c765fafc57141bcb456fc0005b4dbf61d12df22 23-Feb-2013 John Scipione <jscipione@gmail.com>

Rename ColorWell to ColorPreview in Appearance prefs.

No functional change intended.

I'd like to use the name "ColorWell" for a different type of
class eventually so I'm making room for it. ColorPreview is
arguably a better name for the class anyway.

Also did a style cleanup of the ColorWell => ColorPreview class at
the same time.


# 9ed32a430ccf673f99beffe3bdc7b1f5478b5a81 26-Feb-2012 Stephan Aßmus <superstippi@gmx.de>

Embedded the Font into the Appearance Preflet

* Copied the essential parts from the Font preflet into the Appearance
preflet folder.
* Adopted these files to better direct where BMessage arrive and why.
The Font preflet just forwarded them from the BWindow handler,
which was quite messy.
* Embedded the Font preferences as another tab. The first one actually,
with the Decor settings also moved in front of the Anti-Aliasing tab.
* Refactored the Defaults and Revert button updates in the window code.
* AInclude all active settings tabs in the Defaults and Revert handling
for consistency. But eventually, the buttons should only affect the
currently visible page.


# 97510b0338f8ac42a7fa13afd7f1175f7aa213ad 30-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Introduce a new tab to the Appearance Preflet for Decorator
* Show Decorator information button
* Decorator changes happen in real time on click
* Remove *old* OpenBeOS Decerator selection code
* Still have a little cleanup todo
* Need to give a little focus on revert/default buttons
* Decerator test / screenshots?


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


# d96a7d591ef3cc48a4d64936d9d1113ef367469f 21-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.
+alpha


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


# b46615c55ad2c8fe6de54412055a0713da3d610a 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


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


# faff99c017fd4b3eb4b4be9afa2fc19ecd3c8331 20-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Use layout management for all of the window. Can be improved by making
the listview use all the available additional size. But works far better
than before.


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


# b3c05fb63ede179668921e618f0ef40c323b128e 06-Sep-2008 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

* Remember changing the color of an ui_color.
* Simplified code a lot when doing that and removed lots of unused code.

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


# 59e13a3f06eedbc797f797da71c6810634b22cd4 03-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
interface, the ones for the solid cover simply pass through the existing
methods, so only one subpixel blending function is left which does the actual
work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
implements subpixel anti-aliasing for any generic AGG vector pipelines. It
is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
rotated, sheared or big enough fonts) depending on the global subpixel
setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
to InterfaceDefs.cpp where other such functions live. They are not related
to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



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


# f6d52cb737f40a71b861fbb95d43e5fa04cf4fbc 29-Feb-2008 Rene Gollent <anevilyak@gmail.com>

- Added operator = implementation to rgb_color for convenience.
- Major cleanup of Appearance prefs - colors are now dynamically
read from the app_server, and updating them also works, but
triggers a bug: the state of the current window somehow gets
confused, i.e. if I update the panel background color, for some
reason the color of the BButtons in the appearance pref change color
and also the textviews begin misbehaving. Have not yet tracked down
the cause of this, but newly created windows after making the change
do show up with the updated color and behave properly. Also vastly
simplified the pref and cleaned up some obsolete definitions.



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


# 5605e701d7bc5fce3080931bca43700d1f292948 23-Feb-2007 DarkWyrm <darkwyrm@gmail.com>

Added a menu to allow the user to choose the decorator. Untested, but theoretically working. I'll be content with the user being able pick a decorator and tweak system colors for R1.


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


# 3d5da9f46c351cbb1c6da355715c4fac0e307a6a 30-Oct-2006 DarkWyrm <darkwyrm@gmail.com>

Updated style to come pretty close to matching OT style guidelines


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


# a3b25e4ff009f0c0e8bd343efe5b0f7f65f6971c 30-Oct-2006 DarkWyrm <darkwyrm@gmail.com>

Serious simplification and retooling of Appearance app. Just system colors supported for now. Still not finished, but getting there.


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


# a10cf76ef5b9e8c726ebc47183abd6943023cf8f 24-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/prefs to "preferences", as the directory is usually called in BeOS.


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