[haiku-commits] BRANCH looncraz-github.setviewuicolor [f9b0977d34cd] in src: servers/app kits/interface apps preferences/appearance .

  • From: looncraz-github.setviewuicolor <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 10 Dec 2015 20:02:05 +0100 (CET)

added 86 changesets to branch 'refs/remotes/looncraz-github/setviewuicolor'
old head: 197e00b750ccd7840a0ad76c786e271c62c52afb
new head: f9b0977d34cdad69d018570995a79ecc27f8545e
overview: https://github.com/looncraz/haiku/compare/197e00b750cc...f9b0977d34cd

----------------------------------------------------------------------------

7629e2fa449e: Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented
it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into
GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code
cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled
time,
and can also be merged according to set rules. A single thread is used to
service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color
changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the
message
to each BWindow. This is done to improve performance over having the
app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

11e54ef24cfc: LinkReceiver Fix

LinkReceiver would spin endlessly when given a timeout value which prevented
DelayedMessageSender from being operational.

c6da2f9360b6: ControlLook Colors

Enable better use of the proper colors, as well as overriding the
assumed proper colors for labels.

5af02012c915: ColumnListView colors

ColumnListView now responds to system color changes.

f9f4d07bb415: StatusBar colors

Add fInternalFlags and a single flag to denote the use of custom colors.
Have status bar use appropriate colors, either by adopting colors, or
by using system standard colors.
Live colors updates are also working.

37df68803a2d: BAboutWindow colors

f720ab746506: BAlert colors

68c262903a14: BBox colors

2b7bf6d0af25: BButton colors

BButton now properly uses the B_CONTROL_BACKGROUND_COLOR instead of
a darkened view color.

cb4258804761: BControl colors

This includes simple changes to common controls.

76f35cf780a3: AbstractSpinner colors

7e20f65f4b97: Menu colors

54f33143ca5c: BListView colors

817029e42a72: BTabView colors

5494a9ff4a0f: Specialized Layout Views colors

Views used by layout.

e4edbb0fe4fd: Colors

c3f5779e21f5: ToolTip colors

4471107ac944: Chart colors and some font awareness

Chart had horrible behavior with large fonts and many hardcoded colors.
This helps this situation immensely.

284e18f2a6fe: Tests color changes

Iteratively replace usage of Set*Color(ui_color... with Set*UIColor(...

e1d24c7dbb4c: Mail Deskbar Replicant colors

dbbe1646ef68: Bluetooth Deskbar Replicant colors

1b31523213db: Server UI colors

Iterative changes, mostly.

c12bd49e98ca: Time Preflet colors

179c880e8875: Screensaver preflet colors

0bc0555c4dca: Screen Preflet colors

6e0177b22887: Network Preflet Colors

cf488a51564b: Mouse Preflet Colors

7918aea4a722: Media System Colors

Preflet, replicant, and DefaultMediaTheme

f0b59946d1f2: Mail Preflet Colors

d81bf5786807: Locale Preflet Colors

f8ef12b86f62: Keymap colors

ca775d22890c: Joysticks Preflet colors

3a45ee4b0df8: Font Preflet colors

1fe7a3c8d337: FileTypes Preflet colors

7d87a56e1d1c: DataTranslation Preflet - and addons - colors

68d753beb933: Bluetooth Preflet colors

2b2bfcade6db: Appearance Color Handling Update

Use BMessage color support and new API.

2573fafdfa20: Print System Colors

e7ff3ca37888: Tracker uses new API, Improved Font Awareness

InfoWindow now uses the font size to determine the window size and
placement of elements. Also uses syste colors, including link
colors. Permissions view not font sensitive at this time.

859078840234: Mail kit colors

ef1cfd4dcfa1: ToolBar Colors

This was a bigger change than many others as BButton now defaults to using
control background colors, and we can not do that here without the buttons
not appearing as we desire (blending in with the toolbar).

Using the control background color for the toolbar would be unacceptable.

8baab93e8309: Shared UI element colors

f36e91702d29: Bluetooth Incoming Connection colors

13caefe409c9: /bin colors

ef1a2a6690ed: WebPositive Colors

Use system colors, ensure that we don't rely on view having a default
white background when using the layout API (DownloadProgressView)

47596f4b6b1e: Terminal colors

When resizing a window, we need to ensure the low color and the view color
are the same,
otherwise the drawing results will be unpleasant.

Here, I decided to use the user Terminal colors rather than a system color.

c5a560f278ab: Switcher colors

a5ce70e83ba6: Sudoku colors

d23e84923242: StyledEdit colors

2a1038f5ed89: SoundRecorder colors

I lack the hardware to fully adapt this program at this time.

b26b473a8dc0: ShowImage colors

50bb3fa82528: Screenshot window colors

5495543f265e: resedit colors

e0cce2e16731: Pulse colors

3de2251303c4: ProcessController colors

8d774d878828: PowerStatus colors

8171ff9956be: PatchBay Colors

6c23d19849e5: Pairs colors

60408b7db160: PackageInstaller colors

3fef11a0e843: OverlayImage app colors

61b6a4f6aeeb: Network Status Colors

f52ed5966918: MediaPlayer colors

e5614d7ff6b5: Mail application colors

a10be3027301: Magnify app colors

f33c14602c75: Login UI rework

Improve placement with different font sizes, and use user colors.

8aeccc39acb7: Install application colors

Also better placement of text when official logo is absent.

ac700aaad166: Uninstaller colors

679a89608e90: Icon-o-Matic colors

4f53c29b65bd: HaikuDepot colors

This application proved the most difficult to get to use system colors.
It uses a specialized text handling system that does not expose the
ability to change text or background colors at any point.

After discussing at length with the original author it was discovered
that the system is not working as originally intended and fixing it is
beyond the scope of this commit. As such, I added the ability for this
system to use color defined constants so that it can update with system
color changes. I also removed its use from the package list view, as
there was no way to override the color choices to make the MarkupTextView
fit in properly with list colors. This, however, is a non issue as BTextView
has every needed capability for the short description.

In addition to using system colors and live updates, I took it upon myself
to improve the legibility of the user ratings view. A faint line now
separates
each rating, and the rating bars use the control mark color so that they stand
out as something other than a drawing error (which is what I thought it was
for
a long time).

d68888f9b208: FontDemo colors

545807023e48: FirstBootPrompt colors and size

Intelligently use font size to set the window size.

633a930ace88: Expander colors

e91529000ce5: DriveSetup colors

c4fd5d93dd07: DiskProbe colors

95eb83083338: Device app colors

8ca0c8146a2b: Deskbar colors

110281a95b36: DeskCalc colors

Due to the button color logic, we use the rgb_color Brightness to determine
the label colors.

407db3955e19: Debugger colors

7d95faa49678: CharacterMap colors

29680c32d879: BootManager colors, size

Use system colors, intelligently size window according to the font size.

eb0a21ca996d: ActivityMonitor colors

e3353c90b3a3: AboutSystem colors

Use slightly different colors for heading text than for subheading text.
Change uptime view from a BTextView to a BStringView. This fixes the issue
where the AboutWindow did not properly fit its contents.

b8a3eab4b33c: ScreenSaver add-on prefefernce view colors

30e5c6fea0be: Print server add-ons' colors

d19e5b4b1367: Mail daemon addon colors

f9b0977d34cd: TeamMonitorWindow colors

[ looncraz <looncraz@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

367 files changed, 4852 insertions(+), 1680 deletions(-)
docs/user/app/Message.dox | 140 ++-
docs/user/interface/View.dox | 189 +++-
docs/user/interface/Window.dox | 18 +-
headers/os/app/AppDefs.h | 6 +-
headers/os/app/Message.h | 16 +
headers/os/interface/Box.h | 5 +-
headers/os/interface/Button.h | 5 +-
headers/os/interface/ChannelControl.h | 5 +-
headers/os/interface/ChannelSlider.h | 8 +-
headers/os/interface/CheckBox.h | 5 +-
headers/os/interface/ControlLook.h | 18 +-
headers/os/interface/GraphicsDefs.h | 9 +-
headers/os/interface/InterfaceDefs.h | 10 +
headers/os/interface/LayoutBuilder.h | 19 +-
headers/os/interface/ListView.h | 5 +-
headers/os/interface/MenuField.h | 8 +-
headers/os/interface/MultiChannelControl.h | 5 +-
headers/os/interface/OptionControl.h | 5 +-
headers/os/interface/OptionPopUp.h | 7 +-
headers/os/interface/OutlineListView.h | 5 +-
headers/os/interface/PictureButton.h | 5 +-
headers/os/interface/RadioButton.h | 5 +-
headers/os/interface/ScrollView.h | 3 +-
headers/os/interface/Slider.h | 8 +-
headers/os/interface/SplitView.h | 3 +-
headers/os/interface/StatusBar.h | 5 +-
headers/os/interface/StringView.h | 2 +-
headers/os/interface/TextControl.h | 3 +-
headers/os/interface/View.h | 36 +-
headers/os/interface/Window.h | 2 +-
headers/private/app/ServerProtocol.h | 11 +
headers/private/app/ServerProtocolStructs.h | 4 +
headers/private/app/ServerReadOnlyMemory.h | 10 +-
headers/private/interface/AbstractSpinner.h | 2 +-
headers/private/interface/ColorTools.h | 79 --
headers/private/interface/ColumnListView.h | 7 +-
headers/private/interface/DecimalSpinner.h | 2 +-
headers/private/interface/ViewPrivate.h | 14 +-
headers/private/shared/CalendarView.h | 3 +-
.../devices/keyboard/TeamMonitorWindow.cpp | 6 +-
.../inbound_filters/match_header/ConfigView.cpp | 2 +-
.../notifier/NotifierConfigView.cpp | 2 +-
.../spam_filter/SpamFilterConfig.cpp | 2 +-
.../outbound_filters/fortune/ConfigView.cpp | 2 +-
.../print/drivers/pdf/source/DocInfoWindow.cpp | 4 +-
.../print/drivers/pdf/source/FontsWindow.cpp | 4 +-
.../transports/hp_jetdirect/SetupWindow.cpp | 2 +-
src/add-ons/print/transports/ipp/IppSetupDlg.cpp | 2 +-
src/add-ons/print/transports/lpr/LprSetupDlg.cpp | 2 +-
src/add-ons/screen_savers/glife/GLifeConfig.cpp | 2 +-
src/add-ons/screen_savers/gravity/ConfigView.cpp | 2 +-
src/add-ons/screen_savers/nebula/Nebula.cpp | 2 +-
.../slideshowsaver/SlideShowConfigView.cpp | 2 +-
src/add-ons/screen_savers/spider/SpiderSaver.cpp | 2 +-
src/add-ons/translators/bmp/BMPView.cpp | 2 +-
src/add-ons/translators/exr/ConfigView.cpp | 2 +-
src/add-ons/translators/gif/GIFView.cpp | 2 +-
src/add-ons/translators/hpgs/ConfigView.cpp | 2 +-
src/add-ons/translators/jpeg/JPEGTranslator.cpp | 2 +-
.../translators/jpeg2000/JPEG2000Translator.cpp | 2 +-
src/add-ons/translators/pcx/ConfigView.cpp | 2 +-
src/add-ons/translators/png/PNGView.cpp | 4 +-
src/add-ons/translators/ppm/PPMTranslator.cpp | 2 +-
src/add-ons/translators/raw/ConfigView.cpp | 2 +-
src/add-ons/translators/rtf/ConfigView.cpp | 2 +-
src/add-ons/translators/sgi/SGIView.cpp | 2 +-
src/add-ons/translators/stxt/STXTView.cpp | 2 +-
src/add-ons/translators/tga/TGAView.cpp | 2 +-
src/add-ons/translators/tiff/TIFFView.cpp | 4 +-
src/add-ons/translators/webp/ConfigView.cpp | 2 +-
.../translators/wonderbrush/WonderBrushView.cpp | 2 +-
src/apps/aboutsystem/AboutSystem.cpp | 74 +-
src/apps/aboutsystem/Jamfile | 2 +-
src/apps/activitymonitor/ActivityView.cpp | 9 +-
src/apps/activitymonitor/ActivityWindow.cpp | 3 +-
src/apps/activitymonitor/SettingsWindow.cpp | 1 +
src/apps/bootmanager/BootManagerWindow.cpp | 8 +-
src/apps/bootmanager/WizardPageView.cpp | 20 +-
src/apps/charactermap/CharacterView.cpp | 16 +-
.../gui/inspector_window/InspectorWindow.cpp | 6 +-
.../gui/inspector_window/MemoryView.cpp | 4 +-
.../utility_windows/ExpressionPromptWindow.cpp | 2 +-
.../gui/utility_windows/WatchPromptWindow.cpp | 2 +-
src/apps/deskbar/BarMenuBar.cpp | 2 +-
src/apps/deskbar/BarMenuTitle.cpp | 2 +-
src/apps/deskbar/BarView.cpp | 2 +-
src/apps/deskbar/ExpandoMenuBar.cpp | 2 +-
src/apps/deskbar/InlineScrollView.cpp | 2 +-
src/apps/deskbar/StatusView.cpp | 11 +-
src/apps/deskbar/Switcher.cpp | 92 +-
src/apps/deskbar/TeamMenuItem.cpp | 11 +-
src/apps/deskbar/TimeView.cpp | 10 +-
src/apps/deskbar/WindowMenuItem.cpp | 2 +-
src/apps/deskcalc/CalcView.cpp | 17 +-
src/apps/devices/PropertyListPlain.cpp | 26 +-
src/apps/devices/PropertyListPlain.h | 3 +
src/apps/devices/ResourceUsageWindow.cpp | 2 +-
src/apps/diskprobe/FindWindow.cpp | 2 +-
src/apps/diskprobe/ProbeView.cpp | 6 +-
[ *** stats truncated: 268 lines dropped *** ]

############################################################################

Commit: 7629e2fa449eea33bae7c6dcc28517b417c0389a
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:48 2015 UTC

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it
anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to
service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the
message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

----------------------------------------------------------------------------

diff --git a/docs/user/app/Message.dox b/docs/user/app/Message.dox
index 6e1e28e..50f9e12 100644
--- a/docs/user/app/Message.dox
+++ b/docs/user/app/Message.dox
@@ -1078,6 +1078,7 @@
\since BeOS R3
*/

+
/*!
\fn status_t BMessage::AddFloat(const char* name, float aFloat)
\brief Convenience method to add a \c float to the label \a name.
@@ -1119,6 +1120,26 @@


/*!
+ \fn status_t BMessage::AddColor(const char* name, rgb_color aColor)
+ \brief Convenience method to add a \c rgb_color to the label \a name.
+
+ This method calls AddData() with the \c B_RGB_32_BIT_TYPE \a type.
+
+ \param name The label to associate the data with.
+ \param aColor The value to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+
+ \see AddColor() for a more detailed overview of the inner workings.
+ \see FindColor()
+ \see GetColor()
+ \see ReplaceColor()
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn status_t BMessage::AddPointer(const char* name, const void*
aPointer)
\brief Convenience method to add a \c pointer to the label \a name.

@@ -1808,6 +1829,48 @@


/*!
+ \fn status_t BMessage::FindColor(const char* name, rgb_color* value)
+ \brief Find a color with the label \a name.
+
+ This is an overloaded version of
+ FindColor(const char*, int32, rgb_color*) const
+ where the data is sought at \a index \c 0.
+
+ \param name The label to which the data is associated.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::FindColor(const char* name, int32 index,
+ rgb_color* value) const
+ \brief Find a color at the label \a name at an \a index.
+
+ This method looks for the data with the \c B_RGB_32_BIT_TYPE, and copies
+ it into a provided buffer.
+
+ \param name The label to which the data is associated.
+ \param index The index from which the data should be copied.
+ \param value The object in which the data should be copied.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The object now contains the requested data.
+ \retval B_BAD_INDEX The \a index does not exist.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see FindColor(const char*, rgb_color*) const
+
+ \since BeOS R3
+*/
+
+
+/*!
\fn status_t BMessage::FindPointer(const char* name, void** pointer)
const
\brief Find a pointer at the label \a name.

@@ -1849,7 +1912,7 @@
\retval B_BAD_INDEX The \a index does not exist.
\retval B_NAME_NOT_FOUND There is no field with this \a name.

- \see FindPointer(const char*, double*) const
+ \see FindPointer(const char*, void*) const

\since BeOS R3
*/
@@ -2570,6 +2633,49 @@


/*!
+ \fn status_t BMessage::ReplaceColor(const char* name, rgb_color aColot)
+ \brief Replace a color at the label \a name.
+
+ This method is an overloaded method of
+ ReplaceColor(const char*, int32, rgb_color).
+ It replaces the data at \a index \c 0.
+
+ \param name The name associated with the data to replace.
+ \param aColor Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn status_t BMessage::ReplaceColor(const char* name, int32 index,
+ rgb_color aColor)
+ \brief Replace a rgb_color at the label \a name at a specified
+ \a index.
+
+ The data at the specified \a name and \a index will be replaced, if it
+ matches the \c B_RGB_32_BIT_TYPE.
+
+ \param name The name associated with the data to replace.
+ \param index The index in the array to replace.
+ \param aColor Where to store in the message.
+
+ \returns A status code, \c B_OK on success or an error code.
+ \retval B_OK The operation succeeded.
+ \retval B_BAD_INDEX The index was out of range.
+ \retval B_NAME_NOT_FOUND There is no field with this \a name.
+
+ \see ReplaceColor(const char*, rgb_color)
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn status_t BMessage::ReplacePointer(const char* name,
const void* pointer)
\brief Replace a pointer at the label \a name.
@@ -3514,6 +3620,38 @@ bool enabled = GetBool("enabled", false);


/*!
+ \fn rgb_color BMessage::GetColor(const char* name, rgb_color
defaultValue) const
+ \brief Return the rgb_color value from message with \a name, or
+ \a defaultValue if not found.
+
+ \param name The name of the item to retrieve.
+ \param defaultValue The value to use if the item specified by \a name
+ is not found.
+
+ \return The item with \a name, or \a defaultValue if not found.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn rgb_color BMessage::GetColor(const char* name, int32 index,
+ rgb_colorr defaultValue) const
+ \brief Return the rgb_color value from message with \a name and \a
index, or
+ \a defaultValue if not found.
+
+ \param name The name of the item to retrieve.
+ \param index The index of the item to retrieve if there is more than
one.
+ \param defaultValue The value to use if the item specified by \a name
+ is not found.
+
+ \return The item with \a name, or \a defaultValue if not found.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn const char* BMessage::GetString(const char* name,
const char* defaultValue) const
\brief Return the string from message with \a name, or \a defaultValue
if
diff --git a/docs/user/interface/View.dox b/docs/user/interface/View.dox
index 80f7767..6ae10e7 100644
--- a/docs/user/interface/View.dox
+++ b/docs/user/interface/View.dox
@@ -1,13 +1,14 @@
/*
- * Copyright 2011-2014 Haiku, Inc. All rights reserved.
+ * Copyright 2011-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, jscipione@xxxxxxxxx
+ * Joseph Groover, looncraz@xxxxxxxxxxxx
*
* Corresponds to:
- * headers/os/interface/View.h hrev47274
- * src/kits/interface/View.cpp hrev47274
+ * headers/os/interface/View.h hrev497**
+ * src/kits/interface/View.cpp hrev497**
*/


@@ -524,6 +525,15 @@


/*!
+ \var B_FOLLOW_LEFT_TOP
+ \brief The margins between the left and top sides of the view and the
left
+ and top sides of its parent remain constant.
+
+ \since Haiku R1
+*/
+
+
+/*!
\class BView
\ingroup interface
\ingroup libbe
@@ -596,12 +606,13 @@ if (Window()->LockLooper()) {

Each view has a ViewColor() that fills the frame rectangle before the
view does any drawing of its own. The default view color is white, you
may
- change the view color by calling SetViewColor(). A commonly used view
color
- is \c B_PANEL_BACKGROUND_COLOR which is a grey color used as the view
color
- of many Interface Kit classes. If you set the view color to
- \c B_TRANSPARENT_COLOR then the Application Server won't erase the
clipping
- region of the view before updating, this should only be used if the view
- erases itself by drawing on every pixel in the clipping region.
+ change the view color by calling SetViewColor() or, as of Haiku R1,
+ SetViewUIColor(). A commonly used view color is \c
B_PANEL_BACKGROUND_COLOR
+ which is a user-defined color used as the view color of most
applications.
+ If you set the view color to \c B_TRANSPARENT_COLOR then the
Application Server
+ won't erase the clipping region of the view before updating, this
should only
+ be used if the view erases itself by drawing on every pixel in the
clipping
+ region.

If you want to set the view color of a view to be the same as its
parent you
need to set it within the AttachedToWindow() method of the view like so:
@@ -614,6 +625,7 @@ SetViewColor(Parent()->ViewColor());
*/


+
/*!
\fn BView::BView(const char* name, uint32 flags, BLayout* layout)
\brief Layout constructor.
@@ -2058,6 +2070,59 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn bool BView::HasDefaultColors() const
+ \brief Tests if the view has any colors set.
+
+ \return Boolean value, true if colors are not set.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn bool BView::HasSystemColors() const
+ \brief Tests if the view is using system "panel" colors.
+ B_PANEL_BACKGROUND_COLOR for ViewUIColor()
+ B_PANEL_BACKGROUND_COLOR for LowUIColor()
+ B_PANEL_TEXT_COLOR for HighUIColor()
+
+ \return Boolean value, true if colors are as described.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BView::AdoptParentColors()
+ \brief Attempts to use the colors of any parent view.
+ Will adopt view, low, and high colors.
+ Should be called in AttachedToWindow() or AllAttached().
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BView::AdoptSystemColors()
+ \brief Instructs view to use standard system "panel" colors.
+ B_PANEL_BACKGROUND_COLOR for ViewUIColor()
+ B_PANEL_BACKGROUND_COLOR for LowUIColor()
+ B_PANEL_TEXT_COLOR for HighUIColor()
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BView::AdoptViewColors(BView* view)
+ \brief Attempts to use the colors of a given view.
+ Will adopt view, low, and high colors.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BView::SetHighColor(rgb_color color)
\brief Set the high color of the view.

@@ -2082,6 +2147,18 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn void BView::SetHighUIColor(color_which which, float tint)
+ \brief Set the high color of the view to a system constant.
+ The color will update live with user changes.
+
+ \param which The color_which constant to set.
+ \param tint Optional tint value to use.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn rgb_color BView::HighColor() const
\brief Return the current high color.

@@ -2095,6 +2172,20 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn color_which BView::HighUIColor(float* tint) const
+ \brief Return the current high color constant being used.
+
+ \param tint Optional float pointer in which to store the tint
+ value used to modify the system color constant.
+ \return The current high color constant.
+
+ \sa SetHighUIColor(color_which, float)
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BView::SetLowColor(rgb_color color)
\brief Set the low color of the view.

@@ -2118,6 +2209,18 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn void BView::SetLowUIColor(color_which which, float tint)
+ \brief Set the low color of the view to a system constant.
+ The color will update live with user changes.
+
+ \param which The color_which constant to set.
+ \param tint Optional tint value to use.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn rgb_color BView::LowColor() const
\brief Return the current low color.

@@ -2131,6 +2234,20 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn color_which BView::LowUIColor(float* tint) const
+ \brief Return the current low color constant being used.
+
+ \param tint Optional float pointer in which to store the tint
+ value used to modify the system color constant.
+ \return The current low color constant.
+
+ \sa SetLowUIColor(color_which, float)
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BView::SetViewColor(rgb_color color)
\brief Set the view color of the view.

@@ -2155,6 +2272,18 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn void BView::SetViewUIColor(color_which which, float tint)
+ \brief Set the view color of the view to a system constant.
+ The color will update live with user changes.
+
+ \param which The color_which constant to set.
+ \param tint Optional tint value to use.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn rgb_color BView::ViewColor() const
\brief Return the current view color.

@@ -2168,6 +2297,20 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn color_which BView::ViewUIColor(float* tint) const
+ \brief Return the current view color constant being used.
+
+ \param tint Optional float pointer in which to store the tint
+ value used to modify the system color constant.
+ \return The current view color constant.
+
+ \sa SetViewUIColor(color_which, float)
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BView::ForceFontAliasing(bool enable)
\brief Turn anti-aliasing on and off when printing.

@@ -3697,6 +3840,34 @@ SetViewColor(Parent()->ViewColor());


/*!
+ \fn void BView::DelayedInvalidate(bigtime_t delay)
+ \brief Sends a message to App Server to redraw the entire view after
+ a certain, minimum, delay. Repeated calls to this method may be
+ merged, but the view is guaranteed to be redrawn after the delay
+ given in the first call of this method.
+
+ \param delay The time, in microseconds, to wait until redrawing the
view.
+
+ \since Haiku R1
+*/
+
+
+/*!
+ \fn void BView::DelayedInvalidate(bigtime_t delay, BRect invalRect)
+ \brief Sends a message to App Server to redraw the portion of the view
+ specified by \a invalRect after a certain, minimum, delay.
+ Repeated calls to this method may be merged, but the invalidated
+ rect is guaranteed to be redrawn after the minimum delay given
+ by the first call of this method.
+
+ \param delay The time, in microseconds, to wait until redrawing the
view.
+ \param invalRect The rectangular area of the view to redraw.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BView::InvertRect(BRect rect)
\brief Inverts the colors within \a rect.

diff --git a/docs/user/interface/Window.dox b/docs/user/interface/Window.dox
index 7efc81b..4d7653b 100644
--- a/docs/user/interface/Window.dox
+++ b/docs/user/interface/Window.dox
@@ -1,13 +1,14 @@
/*
- * Copyright 2011-2014 Haiku, Inc. All rights reserved.
+ * Copyright 2011-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, jscipione@xxxxxxxxx
+ * Joseph Groover, looncraz@xxxxxxxxxxxx
*
* Corresponds to:
- * headers/os/interface/Window.h hrev45799
- * src/kits/interface/Window.cpp hrev45799
+ * headers/os/interface/Window.h hrev497**
+ * src/kits/interface/Window.cpp hrev497**
*/


@@ -1968,6 +1969,17 @@


/*!
+ \fn bool BWindow::IsOffscreenWindow() const
+ \brief Tests if window is used for drawing into a BBitmap.
+ This is mostly used by the Interface Kit itself.
+
+ \return True if the window is used for drawing into a BBitmap.
+
+ \since Haiku R1
+*/
+
+
+/*!
\fn void BWindow::Show()
\brief Shows the window on screen, places it frontmost on the screen,
adds
the window to Deskbar's window list, and makes it the active
window.
diff --git a/headers/os/app/AppDefs.h b/headers/os/app/AppDefs.h
index 0a70d8b..d48c585 100644
--- a/headers/os/app/AppDefs.h
+++ b/headers/os/app/AppDefs.h
@@ -67,10 +67,8 @@ enum {
B_WORKSPACES_CHANGED = '_WCG',
B_WORKSPACE_ACTIVATED = '_WAC',
B_ZOOM = '_WZM',
- _COLORS_UPDATED = '_CLU',
- // Currently internal-use only. Later, public as
B_COLORS_UPDATED
- _FONTS_UPDATED = '_FNU',
- // Currently internal-use only. Later, public as B_FONTS_UPDATED
+ B_COLORS_UPDATED = '_CLU',
+ B_FONTS_UPDATED = '_FNU',
_APP_MENU_ = '_AMN',
_BROWSER_MENUS_ = '_BRM',
_MENU_EVENT_ = '_MEV',
diff --git a/headers/os/app/Message.h b/headers/os/app/Message.h
index 7d7eab4..077da89 100644
--- a/headers/os/app/Message.h
+++ b/headers/os/app/Message.h
@@ -29,6 +29,7 @@ class BHandler;
class BString;
class BStringList;
struct entry_ref;
+struct rgb_color;


// Name lengths and Scripting specifiers
@@ -154,6 +155,7 @@ public:
status_t AddBool(const char*
name, bool value);
status_t AddFloat(const char*
name, float value);
status_t AddDouble(const char*
name, double value);
+ status_t AddColor(const char*
name, rgb_color value);
status_t AddPointer(const char*
name,
const
void* pointer);
status_t AddMessenger(const
char* name,
@@ -241,6 +243,10 @@ public:
double*
value) const;
status_t FindDouble(const char*
name, int32 index,
double*
value) const;
+ status_t FindColor(const char*
name,
+
rgb_color* value) const;
+ status_t FindColor(const char*
name, int32 index,
+
rgb_color* value) const;
status_t FindPointer(const char*
name,
void**
pointer) const;
status_t FindPointer(const char*
name, int32 index,
@@ -324,6 +330,10 @@ public:
status_t ReplaceDouble(const
char* name, double value);
status_t ReplaceDouble(const
char* name, int32 index,
double
value);
+ status_t ReplaceColor(const
char* name,
+
rgb_color value);
+ status_t ReplaceColor(const
char* name, int32 index,
+
rgb_color value);
status_t ReplacePointer(const
char* name,
const
void* pointer);
status_t ReplacePointer(const
char* name, int32 index,
@@ -379,6 +389,7 @@ public:
bool HasBool(const char*
name, int32 n = 0) const;
bool HasFloat(const char*
name, int32 n = 0) const;
bool HasDouble(const char*
name, int32 n = 0) const;
+ bool HasColor(const char*
name, int32 n = 0) const;
bool HasPointer(const char*
name, int32 n = 0) const;
bool HasMessenger(const
char* name,
int32 n
= 0) const;
@@ -446,6 +457,10 @@ public:
double
defaultValue) const;
double GetDouble(const char*
name, int32 index,
double
defaultValue) const;
+ rgb_color GetColor(const char*
name,
+
rgb_color defaultValue) const;
+ rgb_color GetColor(const char*
name, int32 index,
+
rgb_color defaultValue) const;
const char* GetString(const char*
name,
const
char* defaultValue = NULL) const;
const char* GetString(const char*
name, int32 index,
@@ -477,6 +492,7 @@ public:
status_t SetUInt32(const char*
name, uint32 value);
status_t SetInt64(const char*
name, int64 value);
status_t SetUInt64(const char*
name, uint64 value);
+ status_t SetColor(const char*
name, rgb_color value);
status_t SetPointer(const char*
name, const void* value);
status_t SetString(const char*
name, const char* string);
status_t SetString(const char*
name,
diff --git a/headers/os/interface/Box.h b/headers/os/interface/Box.h
index 37bdf88..a3020d3 100644
--- a/headers/os/interface/Box.h
+++ b/headers/os/interface/Box.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2013 Haiku, Inc. All Rights Reserved.
+ * Copyright 2005-2015 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BOX_H
@@ -12,8 +12,7 @@
class BBox : public BView {
public:
BBox(BRect frame, const
char* name = NULL,
- uint32
resizingMode = B_FOLLOW_LEFT
- |
B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags =
B_WILL_DRAW | B_FRAME_EVENTS
|
B_NAVIGABLE_JUMP,
border_style
border = B_FANCY_BORDER);
diff --git a/headers/os/interface/Button.h b/headers/os/interface/Button.h
index 703bb09..71dfac5 100644
--- a/headers/os/interface/Button.h
+++ b/headers/os/interface/Button.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2014 Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BUTTON_H
@@ -20,8 +20,7 @@ public:
public:
BButton(BRect
frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE

| B_FULL_UPDATE_ON_RESIZE);
BButton(const
char* name, const char* label,
diff --git a/headers/os/interface/ChannelControl.h
b/headers/os/interface/ChannelControl.h
index 3f9e5c8..7df9cd9 100644
--- a/headers/os/interface/ChannelControl.h
+++ b/headers/os/interface/ChannelControl.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2009, Haiku, Inc. All rights reserved.
+ * Copyright 2008-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHANNEL_CONTROL_H
@@ -18,8 +18,7 @@ public:

BChannelControl(BRect frame, const char* name,
const
char* label, BMessage* model,
int32
channelCount = 1,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BChannelControl(const char* name,
const
char* label, BMessage* model,
diff --git a/headers/os/interface/ChannelSlider.h
b/headers/os/interface/ChannelSlider.h
index 8c3961b..5151ef1 100644
--- a/headers/os/interface/ChannelSlider.h
+++ b/headers/os/interface/ChannelSlider.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009, Haiku, Inc. All rights reserved.
+ * Copyright 2009-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHANNEL_SLIDER_H
@@ -14,15 +14,13 @@ public:

BChannelSlider(BRect area, const char* name,
const
char* label, BMessage* message,
int32
channels = 1,
- uint32
resizeMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizeMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BChannelSlider(BRect area, const char* name,
const
char* label, BMessage* message,

orientation orientation,
int32
channels = 1,
- uint32
resizeMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizeMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BChannelSlider(const char* name,
const
char* label, BMessage* message,
diff --git a/headers/os/interface/CheckBox.h b/headers/os/interface/CheckBox.h
index 674a701..056f034 100644
--- a/headers/os/interface/CheckBox.h
+++ b/headers/os/interface/CheckBox.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2014 Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHECK_BOX_H
@@ -13,8 +13,7 @@ class BCheckBox : public BControl {
public:
BCheckBox(BRect
frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);
BCheckBox(const
char* name, const char* label,

BMessage* message, uint32 flags
diff --git a/headers/os/interface/ControlLook.h
b/headers/os/interface/ControlLook.h
index 6de91e2..445f40b 100644
--- a/headers/os/interface/ControlLook.h
+++ b/headers/os/interface/ControlLook.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2012, Haiku, Inc. All rights reserved.
+ * Copyright 2009-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CONTROL_LOOK_H
@@ -85,6 +85,7 @@ public:
B_PARTIALLY_ACTIVATED = 1 << 7, // like B_ACTIVATED, but for
tri-state
B_FLAT = 1 << 8, // flat look
(e.g. button background)
B_INVALID = 1 << 9, // invalid
value, use B_FAILURE_COLOR
+ B_IS_CONTROL = 1 << 10, // use control colors

B_BLEND_FRAME = 1 << 16,
};
@@ -328,27 +329,32 @@ public:

/*virtual*/ void DrawLabel(BView* view, const
char* label,
BRect
rect, const BRect& updateRect,
- const
rgb_color& base, uint32 flags);
+ const
rgb_color& base, uint32 flags,
+ const
rgb_color* textColor = NULL);
virtual void DrawLabel(BView* view, const
char* label,
BRect
rect, const BRect& updateRect,
const
rgb_color& base, uint32 flags,
- const
BAlignment& alignment);
+ const
BAlignment& alignment,
+ const
rgb_color* textColor = NULL);
// TODO: Would be nice to have a (non-virtual) version of this method
// which takes an array of labels and locations. That would save some
// setup with the view graphics state.
/*virtual*/ void DrawLabel(BView* view, const
char* label,
const
rgb_color& base, uint32 flags,
- const
BPoint& where);
+ const
BPoint& where,
+ const
rgb_color* textColor = NULL);

void DrawLabel(BView* view,
const char* label,
const
BBitmap* icon, BRect rect,
const
BRect& updateRect,
- const
rgb_color& base, uint32 flags);
+ const
rgb_color& base, uint32 flags,
+ const
rgb_color* textColor = NULL);
virtual void DrawLabel(BView* view, const
char* label,
const
BBitmap* icon, BRect rect,
const
BRect& updateRect,
const
rgb_color& base, uint32 flags,
- const
BAlignment& alignment);
+ const
BAlignment& alignment,
+ const
rgb_color* textColor = NULL);

virtual void GetFrameInsets(frame_type
frameType,
uint32
flags, float& _left, float& _top,
diff --git a/headers/os/interface/GraphicsDefs.h
b/headers/os/interface/GraphicsDefs.h
index 5e970c0..e98d6de 100644
--- a/headers/os/interface/GraphicsDefs.h
+++ b/headers/os/interface/GraphicsDefs.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2012 Haiku, Inc. All rights reserved.
+ * Copyright 2008-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _GRAPHICS_DEFS_H
@@ -57,6 +57,8 @@ typedef struct rgb_color {
return *this;
}

+ int32 Brightness() const;
+
inline bool
operator==(const rgb_color& other) const
{
@@ -88,6 +90,11 @@ make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha =
255)
#endif


+rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount);
+rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount);
+rgb_color disable_color(rgb_color color, rgb_color background);
+
+
extern const rgb_color B_TRANSPARENT_COLOR;
extern const uint8 B_TRANSPARENT_MAGIC_CMAP8;
extern const uint16 B_TRANSPARENT_MAGIC_RGBA15;
diff --git a/headers/os/interface/InterfaceDefs.h
b/headers/os/interface/InterfaceDefs.h
index 46f3a83..99f15c2 100644
--- a/headers/os/interface/InterfaceDefs.h
+++ b/headers/os/interface/InterfaceDefs.h
@@ -11,6 +11,7 @@


class BBitmap;
+class BMessage;
class BPoint;
class BRect;

@@ -294,6 +295,7 @@ enum bitmap_drawing_options {
// Default UI Colors

enum color_which {
+ B_NO_COLOR = 0,
B_PANEL_BACKGROUND_COLOR = 1,
B_PANEL_TEXT_COLOR = 10,
B_DOCUMENT_BACKGROUND_COLOR = 11,
@@ -308,6 +310,11 @@ enum color_which {
B_SHINE_COLOR = 18,
B_SHADOW_COLOR = 19,

+ B_LINK_TEXT_COLOR = 33,
+ B_LINK_HOVER_COLOR = 34,
+ B_LINK_VISITED_COLOR = 35,
+ B_LINK_ACTIVE_COLOR = 36,
+
B_MENU_BACKGROUND_COLOR = 2,
B_MENU_SELECTED_BACKGROUND_COLOR = 6,
B_MENU_ITEM_TEXT_COLOR = 7,
@@ -461,7 +468,10 @@ void set_accept_first_click(bool
acceptFirstClick);
bool accept_first_click();

rgb_color ui_color(color_which which);
+const char* ui_color_name(color_which which);
+color_which which_ui_color(const char* name);
void set_ui_color(const color_which& which, const rgb_color&
color);
+void set_ui_colors(const BMessage* colors);
rgb_color tint_color(rgb_color color, float tint);

extern "C" status_t _init_interface_kit_();
diff --git a/headers/os/interface/LayoutBuilder.h
b/headers/os/interface/LayoutBuilder.h
index 5f7c721..c882dda 100644
--- a/headers/os/interface/LayoutBuilder.h
+++ b/headers/os/interface/LayoutBuilder.h
@@ -374,9 +374,7 @@ Group<ParentBuilder>::Group(BWindow* window, orientation
orientation,
fLayout(new BGroupLayout(orientation, spacing))
{
window->SetLayout(fLayout);
-
- fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
- // TODO: we get a white background if we don't do this
+ fLayout->Owner()->AdoptSystemColors();
}


@@ -386,9 +384,11 @@ Group<ParentBuilder>::Group(BView* view, orientation
orientation,
:
fLayout(new BGroupLayout(orientation, spacing))
{
+
+ if (view->HasDefaultColors())
+ view->AdoptSystemColors();
+
view->SetLayout(fLayout);
- view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
- // TODO: we get a white background if we don't do this
}


@@ -680,9 +680,7 @@ Grid<ParentBuilder>::Grid(BWindow* window, float
horizontalSpacing,
fLayout(new BGridLayout(horizontalSpacing, verticalSpacing))
{
window->SetLayout(fLayout);
-
- fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
- // TODO: we get a white background if we don't do this
+ fLayout->Owner()->AdoptSystemColors();
}


@@ -692,9 +690,10 @@ Grid<ParentBuilder>::Grid(BView* view, float
horizontalSpacing,
:
fLayout(new BGridLayout(horizontalSpacing, verticalSpacing))
{
+ if (view->HasDefaultColors())
+ view->AdoptSystemColors();
+
view->SetLayout(fLayout);
- view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
- // TODO: we get a white background if we don't do this
}


diff --git a/headers/os/interface/ListView.h b/headers/os/interface/ListView.h
index 311fa77..fe8a9af 100644
--- a/headers/os/interface/ListView.h
+++ b/headers/os/interface/ListView.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 Haiku, Inc. All rights reserved.
+ * Copyright 2002-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LIST_VIEW_H
@@ -26,8 +26,7 @@ public:
BListView(BRect
frame, const char* name,

list_view_type type

= B_SINGLE_SELECTION_LIST,
- uint32
resizeMask = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizeMask = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW

| B_FRAME_EVENTS | B_NAVIGABLE);
BListView(const
char* name,
diff --git a/headers/os/interface/MenuField.h b/headers/os/interface/MenuField.h
index bbc95ab..d605419 100644
--- a/headers/os/interface/MenuField.h
+++ b/headers/os/interface/MenuField.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2013, Haiku, Inc. All rights reserved.
+ * Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _MENU_FIELD_H
@@ -17,14 +17,12 @@ class BMenuField : public BView {
public:

BMenuField(BRect frame, const char* name,
const
char* label, BMenu* menu,
- uint32
resizingMode = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BMenuField(BRect frame, const char* name,
const
char* label, BMenu* menu,
bool
fixed_size,
- uint32
resizingMode = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BMenuField(const char* name,
const
char* label, BMenu* menu,
diff --git a/headers/os/interface/MultiChannelControl.h
b/headers/os/interface/MultiChannelControl.h
index 49733d6..4f4aff0 100644
--- a/headers/os/interface/MultiChannelControl.h
+++ b/headers/os/interface/MultiChannelControl.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009, Haiku, Inc. All rights reserved.
+ * Copyright 2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _MULTI_CHANNEL_CONTROL_H
@@ -14,8 +14,7 @@ public:

BMultiChannelControl(BRect frame,
const
char* name, const char* label,

BMessage* message, int32 channelCount = 1,
- uint32
resize = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resize = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BMultiChannelControl(BMessage* archive);
virtual ~BMultiChannelControl();
diff --git a/headers/os/interface/OptionControl.h
b/headers/os/interface/OptionControl.h
index d038f5f..d5f28f3 100644
--- a/headers/os/interface/OptionControl.h
+++ b/headers/os/interface/OptionControl.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2009, Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OPTION_CONTROL_H
@@ -18,8 +18,7 @@ class BOptionControl : public BControl {
public:

BOptionControl(BRect frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizeMask = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizeMask = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BOptionControl(const char* name,
const
char* label, BMessage* message,
diff --git a/headers/os/interface/OptionPopUp.h
b/headers/os/interface/OptionPopUp.h
index 12110a7..2c6cc3d 100644
--- a/headers/os/interface/OptionPopUp.h
+++ b/headers/os/interface/OptionPopUp.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2009, Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OPTION_POP_UP_H
@@ -16,13 +16,12 @@ class BOptionPopUp : public BOptionControl {
public:

BOptionPopUp(BRect frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizeMask = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizeMask = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BOptionPopUp(BRect frame, const char* name,
const
char* label, BMessage* message,
bool
fixed, uint32 resizeMask
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+
= B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BOptionPopUp(const char* name,
const
char* label, BMessage* message,
diff --git a/headers/os/interface/OutlineListView.h
b/headers/os/interface/OutlineListView.h
index 2dc58ce..2d519da 100644
--- a/headers/os/interface/OutlineListView.h
+++ b/headers/os/interface/OutlineListView.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2013, Haiku, Inc. All rights reserved.
+ * Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OUTLINE_LIST_VIEW_H
@@ -14,8 +14,7 @@ public:

BOutlineListView(BRect frame, const char* name,

list_view_type type

= B_SINGLE_SELECTION_LIST,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW

| B_FRAME_EVENTS | B_NAVIGABLE);

BOutlineListView(const char* name,
diff --git a/headers/os/interface/PictureButton.h
b/headers/os/interface/PictureButton.h
index 904ff46..0a21ea9 100644
--- a/headers/os/interface/PictureButton.h
+++ b/headers/os/interface/PictureButton.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2008, Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PICTURE_BUTTON_H
@@ -22,8 +22,7 @@ public:

BPicture* off, BPicture* on,

BMessage* message,
uint32
behavior = B_ONE_STATE_BUTTON,
- uint32
resizingMode = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flgs = B_WILL_DRAW | B_NAVIGABLE);

BPictureButton(BMessage* archive);

diff --git a/headers/os/interface/RadioButton.h
b/headers/os/interface/RadioButton.h
index 6a218db..a1cd200 100644
--- a/headers/os/interface/RadioButton.h
+++ b/headers/os/interface/RadioButton.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2008, Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _RADIO_BUTTON_H
@@ -14,8 +14,7 @@ class BRadioButton : public BControl {
public:

BRadioButton(BRect frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BRadioButton(const char* name,
const
char* label, BMessage* message,
diff --git a/headers/os/interface/ScrollView.h
b/headers/os/interface/ScrollView.h
index 7abec2d..d90c7587 100644
--- a/headers/os/interface/ScrollView.h
+++ b/headers/os/interface/ScrollView.h
@@ -15,8 +15,7 @@
class BScrollView : public BView {
public:

BScrollView(const char* name, BView* target,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = 0, bool horizontal = false,
bool
vertical = false,

border_style border = B_FANCY_BORDER);
diff --git a/headers/os/interface/Slider.h b/headers/os/interface/Slider.h
index 42e8148..888bb8f 100644
--- a/headers/os/interface/Slider.h
+++ b/headers/os/interface/Slider.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2013, Haiku, Inc. All rights reserved.
+ * Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SLIDER_H
@@ -30,8 +30,7 @@ public:
const
char* label, BMessage* message,
int32
minValue, int32 maxValue,

thumb_style thumbType = B_BLOCK_THUMB,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_NAVIGABLE | B_WILL_DRAW

| B_FRAME_EVENTS);

@@ -40,8 +39,7 @@ public:
int32
minValue, int32 maxValue,

orientation posture,

thumb_style thumbType = B_BLOCK_THUMB,
- uint32
resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_NAVIGABLE | B_WILL_DRAW

| B_FRAME_EVENTS);

diff --git a/headers/os/interface/SplitView.h b/headers/os/interface/SplitView.h
index c4d3dd5..efa8a47 100644
--- a/headers/os/interface/SplitView.h
+++ b/headers/os/interface/SplitView.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010, Haiku, Inc. All rights reserved.
+ * Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SPLIT_VIEW_H
@@ -61,6 +61,7 @@ public:
bool AddChild(int32 index,
BLayoutItem* child,
float
weight);

+ virtual void AttachedToWindow();
virtual void Draw(BRect updateRect);
virtual void DrawAfterChildren(BRect
updateRect);
virtual void MouseDown(BPoint where);
diff --git a/headers/os/interface/StatusBar.h b/headers/os/interface/StatusBar.h
index 789f3a9..9f17da6 100644
--- a/headers/os/interface/StatusBar.h
+++ b/headers/os/interface/StatusBar.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2009, Haiku, Inc. All rights reserved.
+ * Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STATUS_BAR_H
@@ -110,8 +110,9 @@ private:
float fTextDivider;
rgb_color fBarColor;
bool fCustomBarHeight;
+ uint32 fInternalFlags;

- uint32 _reserved[5];
+ uint32 _reserved[4];
};

#endif // _STATUS_BAR_H
diff --git a/headers/os/interface/StringView.h
b/headers/os/interface/StringView.h
index 820b41a..d75dfc2 100644
--- a/headers/os/interface/StringView.h
+++ b/headers/os/interface/StringView.h
@@ -13,7 +13,7 @@ class BStringView : public BView {
public:

BStringView(BRect frame, const char* name,
const
char* text, uint32 resizingMode
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+
= B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW);

BStringView(const char* name, const char* text,
uint32
flags = B_WILL_DRAW);
diff --git a/headers/os/interface/TextControl.h
b/headers/os/interface/TextControl.h
index 49fd7b5..3c8792b 100644
--- a/headers/os/interface/TextControl.h
+++ b/headers/os/interface/TextControl.h
@@ -21,8 +21,7 @@ public:

BTextControl(BRect frame, const char* name,
const
char* label, const char* initialText,

BMessage* message,
- uint32
resizeMask
-
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizeMask = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BTextControl(const char* name,
const
char* label, const char* initialText,
diff --git a/headers/os/interface/View.h b/headers/os/interface/View.h
index 84079e1..ddec3df 100644
--- a/headers/os/interface/View.h
+++ b/headers/os/interface/View.h
@@ -107,6 +107,7 @@ inline uint32 _rule_(uint32 r1, uint32 r2, uint32 r3,
uint32 r4)
#define B_FOLLOW_TOP_BOTTOM _rule_(_VIEW_TOP_, 0, _VIEW_BOTTOM_, 0)
#define B_FOLLOW_V_CENTER _rule_(_VIEW_CENTER_, 0, _VIEW_CENTER_, 0)

+#define B_FOLLOW_LEFT_TOP B_FOLLOW_TOP | B_FOLLOW_LEFT

class BBitmap;
class BCursor;
@@ -242,32 +243,38 @@ public:
void SetViewCursor(const
BCursor* cursor,
bool
sync = true);

+ bool HasDefaultColors()
const;
+ bool HasSystemColors() const;
+ void AdoptParentColors();
+ void AdoptSystemColors();
+ void AdoptViewColors(BView*
view);
+
virtual void SetViewColor(rgb_color color);
void SetViewColor(uchar red,
uchar green, uchar blue,
uchar
alpha = 255);
rgb_color ViewColor() const;

+ void
SetViewUIColor(color_which which,
+ float
tint = B_NO_TINT);
+ color_which ViewUIColor(float* tint
= NULL) const;
+
void SetViewBitmap(const
BBitmap* bitmap,
BRect
srcRect, BRect dstRect,
- uint32
followFlags
-
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
+ uint32
followFlags = B_FOLLOW_LEFT_TOP,
uint32
options = B_TILE_BITMAP);
void SetViewBitmap(const
BBitmap* bitmap,
- uint32
followFlags
-
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
+ uint32
followFlags = B_FOLLOW_LEFT_TOP,
uint32
options = B_TILE_BITMAP);
void ClearViewBitmap();

status_t SetViewOverlay(const
BBitmap* overlay,
BRect
srcRect, BRect dstRect,

rgb_color* colorKey,
- uint32
followFlags
-
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
+ uint32
followFlags = B_FOLLOW_LEFT_TOP,
uint32
options = 0);
status_t SetViewOverlay(const
BBitmap* overlay,

rgb_color* colorKey,
- uint32
followFlags
-
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
+ uint32
followFlags = B_FOLLOW_LEFT_TOP,
uint32
options = 0);
void ClearViewOverlay();

@@ -276,11 +283,19 @@ public:
uchar
alpha = 255);
rgb_color HighColor() const;

+ void
SetHighUIColor(color_which which,
+ float
tint = B_NO_TINT);
+ color_which HighUIColor(float* tint
= NULL) const;
+
virtual void SetLowColor(rgb_color color);
void SetLowColor(uchar red,
uchar green, uchar blue,
uchar
alpha = 255);
rgb_color LowColor() const;

+ void
SetLowUIColor(color_which which,
+ float
tint = B_NO_TINT);
+ color_which LowUIColor(float* tint
= NULL) const;
+
void SetLineMode(cap_mode
lineCap,

join_mode lineJoin,
float
miterLimit = B_DEFAULT_MITER_LIMIT);
@@ -495,6 +510,9 @@ public:
void Invalidate(BRect
invalRect);
void Invalidate(const
BRegion* invalRegion);
void Invalidate();
+ void
DelayedInvalidate(bigtime_t delay);
+ void
DelayedInvalidate(bigtime_t delay,
+ BRect
invalRect);

void SetDiskMode(char*
filename, long offset);

@@ -691,9 +709,11 @@ private:

void _Activate(bool state);
void _Attach();
+ void
_ColorsUpdated(BMessage* message);
void _Detach();
void _Draw(BRect
screenUpdateRect);
void
_DrawAfterChildren(BRect screenUpdateRect);
+ void
_FontsUpdated(BMessage*);
void _Pulse();

void _UpdateStateForRemove();
diff --git a/headers/os/interface/Window.h b/headers/os/interface/Window.h
index 586bfb7..c59a549 100644
--- a/headers/os/interface/Window.h
+++ b/headers/os/interface/Window.h
@@ -272,7 +272,7 @@ public:

void InvalidateLayout(bool
descendants = false);
void Layout(bool force);
-
+ bool IsOffscreenWindow()
const;
private:
// FBC padding and forbidden methods
virtual void _ReservedWindow2();
diff --git a/headers/private/app/ServerProtocol.h
b/headers/private/app/ServerProtocol.h
index d5f42f0..73b0a7c 100644
--- a/headers/private/app/ServerProtocol.h
+++ b/headers/private/app/ServerProtocol.h
@@ -293,11 +293,18 @@ enum {
AS_VIEW_SET_PEN_SIZE,
AS_VIEW_GET_PEN_SIZE,
AS_VIEW_SET_HIGH_COLOR,
+ AS_VIEW_SET_HIGH_UI_COLOR,
AS_VIEW_SET_LOW_COLOR,
+ AS_VIEW_SET_LOW_UI_COLOR,
AS_VIEW_SET_VIEW_COLOR,
+ AS_VIEW_SET_VIEW_UI_COLOR,
AS_VIEW_GET_HIGH_COLOR,
+ AS_VIEW_GET_HIGH_UI_COLOR,
AS_VIEW_GET_LOW_COLOR,
+ AS_VIEW_GET_LOW_UI_COLOR,
AS_VIEW_GET_VIEW_COLOR,
+ AS_VIEW_GET_VIEW_UI_COLOR,
+
AS_VIEW_PRINT_ALIASING,
AS_VIEW_CLIP_TO_PICTURE,
AS_VIEW_GET_CLIP_REGION,
@@ -314,6 +321,7 @@ enum {
AS_VIEW_COPY_BITS,
AS_VIEW_DRAW_PICTURE,
AS_VIEW_INVALIDATE_RECT,
+ AS_VIEW_DELAYED_INVALIDATE_RECT,
AS_VIEW_INVALIDATE_REGION,
AS_VIEW_INVERT_RECT,
AS_VIEW_MOVE_TO,
@@ -355,6 +363,9 @@ enum {
AS_VIEW_CLIP_TO_RECT,
AS_VIEW_CLIP_TO_SHAPE,

+ // Internal messages
+ AS_COLOR_MAP_UPDATED,
+
AS_LAST_CODE
};

diff --git a/headers/private/app/ServerProtocolStructs.h
b/headers/private/app/ServerProtocolStructs.h
index 8eec0aa..ff98636 100644
--- a/headers/private/app/ServerProtocolStructs.h
+++ b/headers/private/app/ServerProtocolStructs.h
@@ -18,6 +18,10 @@ struct ViewSetStateInfo {
float penSize;
rgb_color highColor;
rgb_color lowColor;
+ color_which whichHighColor;
+ color_which whichLowColor;
+ float whichHighColorTint;
+ float whichLowColorTint;
::pattern pattern;
drawing_mode drawingMode;
BPoint origin;
diff --git a/headers/private/app/ServerReadOnlyMemory.h
b/headers/private/app/ServerReadOnlyMemory.h
index 2384981..f62e3c0 100644
--- a/headers/private/app/ServerReadOnlyMemory.h
+++ b/headers/private/app/ServerReadOnlyMemory.h
@@ -13,11 +13,11 @@
#include <InterfaceDefs.h>


-// Update this constant with the largest color constant excluding
-// B_SUCCESS_COLOR and B_FAILURE_COLOR.
-// If you add a constant with index greater than 100 you'll have to add
-// to the second operand.
-static const int32 kColorWhichCount = B_SCROLL_BAR_THUMB_COLOR + 3;
+// Update kColorWhichLastContinuous with the largest color constant which
+// leaves no gaps in the color_which integer values.
+static const int32 kColorWhichLastContinuous = B_LINK_ACTIVE_COLOR;
+static const int32 kColorWhichCount = kColorWhichLastContinuous + 3;
+ // + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR


struct server_read_only_memory {
diff --git a/headers/private/interface/AbstractSpinner.h
b/headers/private/interface/AbstractSpinner.h
index 9d961b1..e822299 100644
--- a/headers/private/interface/AbstractSpinner.h
+++ b/headers/private/interface/AbstractSpinner.h
@@ -39,7 +39,7 @@ class BAbstractSpinner : public BControl {
public:

BAbstractSpinner(BRect frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BAbstractSpinner(const char* name, const char* label,

BMessage* message,
diff --git a/headers/private/interface/ColorTools.h
b/headers/private/interface/ColorTools.h
deleted file mode 100644
index 8f7e78e..0000000
--- a/headers/private/interface/ColorTools.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-Open Tracker License
-
-Terms and Conditions
-
-Copyright (c) 1991-2000, Be Incorporated. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice applies to all licensees
-and shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Be Incorporated shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from Be Incorporated.
-
-Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
trademarks
-of Be Incorporated in the United States and other countries. Other brand
product
-names are registered trademarks or trademarks of their respective holders.
-All rights reserved.
-*/
-
-/*******************************************************************************
-/
-/ File: ColorTools.h
-/
-/ Description: Additional experimental color manipulation functions.
-/
-/ Copyright 2000, Be Incorporated, All Rights Reserved
-/
-*******************************************************************************/
-
-
-#ifndef _COLOR_TOOLS_H
-#define _COLOR_TOOLS_H
-
-#include <GraphicsDefs.h>
-
-#if B_BEOS_VERSION <= B_BEOS_VERSION_5
-
-namespace BExperimental {
-
-// Mix two colors together, ignoring their relative alpha channels.
-// If amount is 0, the result is color1; if 255, the result is color2;
-// if another value, it is somewhere in-between. The resulting alpha
-// channel is mixed exactly like the other color channels.
-rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount);
-
-// Blend two colors together, weighting by their relative alpha channels.
-// The resulting color is the same as mix_color(), except that the amount
-// used from color1 and color2's color channels is dependent on that color's
-// alpha channel. For example, if color1.alpha is 0 and color2.alpha is
-// 255, the resulting red, green, and blue values will be the same as those
-// in color2, regardless of 'amount'.
-rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount);
-
-// Return a color that is the disabled representation of 'color' when drawn
-// on a solid color 'background'.
-rgb_color disable_color(rgb_color color, rgb_color background);
-
-} // namespace BExperimental
-
-using namespace BExperimental;
-
-#endif
-
-#endif
diff --git a/headers/private/interface/ColumnListView.h
b/headers/private/interface/ColumnListView.h
index 76fd0bc..5cfdf13 100644
--- a/headers/private/interface/ColumnListView.h
+++ b/headers/private/interface/ColumnListView.h
@@ -63,10 +63,10 @@ class RecursiveOutlineIterator;

} // ns BPrivate

-class BField;
-class BRow;
class BColumn;
class BColumnListView;
+class BField;
+class BRow;

enum LatchType {
B_NO_LATCH = 0,
@@ -353,6 +353,7 @@ public:
// Appearance (NEW STYLE)
void
SetColor(ColumnListViewColor colorIndex,

rgb_color color);
+ void ResetColors();
void
SetFont(ColumnListViewFont fontIndex,
const
BFont* font,
uint32
mask = B_FONT_ALL);
@@ -396,12 +397,14 @@ protected:

private:
void _Init();
+ void _UpdateColors();
void
_GetChildViewRects(const BRect& bounds,
BRect&
titleRect, BRect& outlineRect,
BRect&
vScrollBarRect,
BRect&
hScrollBarRect);

rgb_color
fColorList[B_COLOR_TOTAL];
+ bool fCustomColors;
BPrivate::TitleView* fTitleView;
BPrivate::OutlineView* fOutlineView;
BList fColumns;
diff --git a/headers/private/interface/DecimalSpinner.h
b/headers/private/interface/DecimalSpinner.h
index 46161c7..9c97367 100644
--- a/headers/private/interface/DecimalSpinner.h
+++ b/headers/private/interface/DecimalSpinner.h
@@ -16,7 +16,7 @@ class BDecimalSpinner : public BAbstractSpinner {
public:

BDecimalSpinner(BRect frame, const char* name,
const
char* label, BMessage* message,
- uint32
resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP,
+ uint32
resizingMode = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_NAVIGABLE);

BDecimalSpinner(const char* name, const char* label,

BMessage* message,
diff --git a/headers/private/interface/ViewPrivate.h
b/headers/private/interface/ViewPrivate.h
index 7d642d7..676454a 100644
--- a/headers/private/interface/ViewPrivate.h
+++ b/headers/private/interface/ViewPrivate.h
@@ -42,8 +42,11 @@ enum {
B_VIEW_PATTERN_BIT = 0x00020000,
B_VIEW_TRANSFORM_BIT = 0x00040000,
B_VIEW_FILL_RULE_BIT = 0x00080000,
+ B_VIEW_WHICH_VIEW_COLOR_BIT = 0x00100000,
+ B_VIEW_WHICH_LOW_COLOR_BIT = 0x00200000,
+ B_VIEW_WHICH_HIGH_COLOR_BIT = 0x00400000,

- B_VIEW_ALL_BITS = 0x000fffff,
+ B_VIEW_ALL_BITS = 0x00ffffff,

// these used for archiving only
B_VIEW_RESIZE_BIT = 0x00001000,
@@ -107,6 +110,15 @@ class ViewState {

// This one is not affected by pop state/push state
rgb_color view_color;
+ color_which which_view_color;
+ float which_view_color_tint;
+
+ // these are cached values
+ color_which which_low_color;
+ float which_low_color_tint;
+
+ color_which which_high_color;
+ float which_high_color_tint;

::pattern pattern;

diff --git a/headers/private/shared/CalendarView.h
b/headers/private/shared/CalendarView.h
index b7f0dce..d48c991 100644
--- a/headers/private/shared/CalendarView.h
+++ b/headers/private/shared/CalendarView.h
@@ -26,8 +26,7 @@ namespace BPrivate {
class BCalendarView : public BView, public BInvoker {
public:

BCalendarView(BRect frame, const char* name,
- uint32
resizeMask = B_FOLLOW_LEFT
-
| B_FOLLOW_TOP,
+ uint32
resizeMask = B_FOLLOW_LEFT_TOP,
uint32
flags = B_WILL_DRAW | B_FRAME_EVENTS

| B_NAVIGABLE);

diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp
index cda2c6d..c4a21d7 100644
--- a/src/kits/app/Application.cpp
+++ b/src/kits/app/Application.cpp
@@ -1002,6 +1002,8 @@ BApplication::DispatchMessage(BMessage* message,
BHandler* handler)
return;
}

+ message->PrintToStream();
+
switch (message->what) {
case B_ARGV_RECEIVED:
_ArgvReceived(message);
@@ -1060,6 +1062,23 @@ BApplication::DispatchMessage(BMessage* message,
BHandler* handler)
break;
}

+ case B_COLORS_UPDATED:
+ {
+ AutoLocker<BLooperList> listLock(gLooperList);
+ if (!listLock.IsLocked())
+ break;
+
+ BWindow* window = NULL;
+ uint32 count = gLooperList.CountLoopers();
+ for (uint32 index = 0; index < count; ++index) {
+ window =
dynamic_cast<BWindow*>(gLooperList.LooperAt(index));
+ if (window == NULL || (window != NULL &&
window->fOffscreen))
+ continue;
+ window->PostMessage(message);
+ }
+ break;
+ }
+
case _SHOW_DRAG_HANDLES_:
{
bool show;
diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp
index d182493..eac16f4 100644
--- a/src/kits/app/Message.cpp
+++ b/src/kits/app/Message.cpp
@@ -22,6 +22,7 @@
#include <AppMisc.h>
#include <BlockCache.h>
#include <Entry.h>
+#include <GraphicsDefs.h>
#include <MessageQueue.h>
#include <Messenger.h>
#include <Path.h>
@@ -735,6 +736,14 @@ BMessage::_PrintToStream(const char* indent) const
break;
}

+ case B_RGB_32_BIT_TYPE:
+ {
+ rgb_color* color = (rgb_color*)pointer;
+ printf("rgb_color(%u, %u, %u, %u)\n",
color->red,
+ color->green, color->blue,
color->alpha);
+ break;
+ }
+
default:
{
printf("(type = '%.4s')(size = %ld)\n",
(char*)&value,
@@ -2494,6 +2503,7 @@ DEFINE_FUNCTIONS(uint64, UInt64, B_UINT64_TYPE);
DEFINE_FUNCTIONS(bool, Bool, B_BOOL_TYPE);
DEFINE_FUNCTIONS(float, Float, B_FLOAT_TYPE);
DEFINE_FUNCTIONS(double, Double, B_DOUBLE_TYPE);
+DEFINE_FUNCTIONS(rgb_color, Color, B_RGB_32_BIT_TYPE);

#undef DEFINE_FUNCTIONS

@@ -2577,6 +2587,7 @@ DEFINE_SET_GET_FUNCTIONS(uint64, UInt64, B_UINT64_TYPE);
DEFINE_SET_GET_FUNCTIONS(bool, Bool, B_BOOL_TYPE);
DEFINE_SET_GET_FUNCTIONS(float, Float, B_FLOAT_TYPE);
DEFINE_SET_GET_FUNCTIONS(double, Double, B_DOUBLE_TYPE);
+DEFINE_SET_GET_FUNCTIONS(rgb_color, Color, B_RGB_32_BIT_TYPE);

#undef DEFINE_SET_GET_FUNCTION

diff --git a/src/kits/interface/ColorTools.cpp
b/src/kits/interface/ColorTools.cpp
deleted file mode 100644
index e4aea31..0000000
--- a/src/kits/interface/ColorTools.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-Open Tracker License
-
-Terms and Conditions
-
-Copyright (c) 1991-2000, Be Incorporated. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice applies to all licensees
-and shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Be Incorporated shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from Be Incorporated.
-
-Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
trademarks
-of Be Incorporated in the United States and other countries. Other brand
product
-names are registered trademarks or trademarks of their respective holders.
-All rights reserved.
-*/
-
-/*******************************************************************************
-/
-/ File: ColorTools.cpp
-/
-/ Description: Additional experimental color manipulation functions.
-/
-/ Copyright 2000, Be Incorporated, All Rights Reserved
-/
-*******************************************************************************/
-
-#include "ColorTools.h"
-
-#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI
-
-namespace BExperimental {
-
-#if DEBUG
-#define DB_INLINE
-#else
-#define DB_INLINE inline
-#endif
-
-static DB_INLINE void mix_color_func(rgb_color* target, const rgb_color other,
uint8 amount)
-{
- target->red = (uint8)(
((int16(other.red)-int16(target->red))*amount)/255
- + target->red );
- target->green = (uint8)(
((int16(other.green)-int16(target->green))*amount)/255
- + target->green
);
- target->blue = (uint8)(
((int16(other.blue)-int16(target->blue))*amount)/255
- + target->blue
);
- target->alpha = (uint8)(
((int16(other.alpha)-int16(target->alpha))*amount)/255
- + target->alpha
);
-}
-
-static DB_INLINE void blend_color_func(rgb_color* target, const rgb_color
other, uint8 amount)
-{
- const uint8 alphaMix = (uint8)(
((int16(other.alpha)-int16(255-target->alpha))*amount)/255
- +
(255-target->alpha) );
- target->red = (uint8)(
((int16(other.red)-int16(target->red))*alphaMix)/255
- + target->red );
- target->green = (uint8)(
((int16(other.green)-int16(target->green))*alphaMix)/255
- + target->green
);
- target->blue = (uint8)(
((int16(other.blue)-int16(target->blue))*alphaMix)/255
- + target->blue
);
- target->alpha = (uint8)(
((int16(other.alpha)-int16(target->alpha))*amount)/255
- + target->alpha
);
-}
-
-static DB_INLINE void disable_color_func(rgb_color* target, const rgb_color
background)
-{
- blend_color_func(target, background, 255-70);
-}
-
-// --------------------------------------------------------------------------
-
-rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount)
-{
- mix_color_func(&color1, color2, amount);
- return color1;
-}
-
-rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount)
-{
- blend_color_func(&color1, color2, amount);
- return color1;
-}
-
-rgb_color disable_color(rgb_color color, rgb_color background)
-{
- disable_color_func(&color, background);
- return color;
-}
-
-}
-
-#endif
diff --git a/src/kits/interface/GraphicsDefs.cpp
b/src/kits/interface/GraphicsDefs.cpp
index db59bd5..b40e395 100644
--- a/src/kits/interface/GraphicsDefs.cpp
+++ b/src/kits/interface/GraphicsDefs.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2008, Haiku.
+ * Copyright 2001-2015, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -36,6 +36,58 @@ const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG = 0x77747700;
const struct screen_id B_MAIN_SCREEN_ID = {0};


+// rgb_color
+int32
+rgb_color::Brightness() const
+{
+ return ((int32)red * 41 + (int32)green * 187 + (int32)blue * 28) >> 8;
+}
+
+
+// Mix two colors without respect for their alpha values
+rgb_color
+mix_color(rgb_color color1, rgb_color color2, uint8 amount)
+{
+ color1.red = (uint8)(((int16(color2.red) - int16(color1.red)) * amount)
+ / 255 + color1.red);
+ color1.green = (uint8)(((int16(color2.green) - int16(color1.green))
+ * amount) / 255 + color1.green);
+ color1.blue = (uint8)(((int16(color2.blue) - int16(color1.blue)) *
amount)
+ / 255 + color1.blue );
+ color1.alpha = (uint8)(((int16(color2.alpha) - int16(color1.alpha))
+ * amount) / 255 + color1.alpha );
+
+ return color1;
+}
+
+
+// Mix two colors, respecting their alpha values.
+rgb_color
+blend_color(rgb_color color1, rgb_color color2, uint8 amount)
+{
+ const uint8 alphaMix = (uint8)(((int16(color2.alpha) - int16(255
+ - color1.alpha)) * amount) / 255 + (255 - color1.alpha));
+
+ color1.red = (uint8)(((int16(color2.red) - int16(color1.red)) *
alphaMix)
+ / 255 + color1.red );
+ color1.green = (uint8)(((int16(color2.green) - int16(color1.green))
+ * alphaMix) / 255 + color1.green);
+ color1.blue = (uint8)(((int16(color2.blue) - int16(color1.blue))
+ * alphaMix) / 255 + color1.blue);
+ color1.alpha = (uint8)(((int16(color2.alpha) - int16(color1.alpha))
+ * amount) / 255 + color1.alpha);
+
+ return color1;
+}
+
+
+rgb_color
+disable_color(rgb_color color, rgb_color background)
+{
+ return mix_color(color, background, 185);
+}
+
+
status_t
get_pixel_size_for(color_space space, size_t *pixelChunk, size_t *rowAlignment,
size_t *pixelsPerChunk)
diff --git a/src/kits/interface/InterfaceDefs.cpp
b/src/kits/interface/InterfaceDefs.cpp
index 880f786..97017b3 100644
--- a/src/kits/interface/InterfaceDefs.cpp
+++ b/src/kits/interface/InterfaceDefs.cpp
@@ -8,6 +8,7 @@
* Axel Dörfler, axeld@xxxxxxxxxxxxxxxx
* Michael Lotz <mmlr@xxxxxxxx>
* Wim van der Meer <WPJvanderMeer@xxxxxxxxx>
+ * Joseph Groover <looncraz@xxxxxxxxxxxx>
*/


@@ -39,6 +40,7 @@
#include <ColorConversion.h>
#include <DecorInfo.h>
#include <DefaultColors.h>
+#include <DesktopLink.h>
#include <InputServerTypes.h>
#include <input_globals.h>
#include <InterfacePrivate.h>
@@ -102,6 +104,10 @@ static const rgb_color _kDefaultColors[kColorWhichCount] =
{
{0, 0, 0, 255}, // B_LIST_ITEM_TEXT_COLOR
{0, 0, 0, 255}, // B_LIST_SELECTED_ITEM_TEXT_COLOR
{216, 216, 216, 255}, // B_SCROLL_BAR_THUMB_COLOR
+ {51, 102, 187, 255}, // B_LINK_TEXT_COLOR
+ {102, 152, 203, 255}, // B_LINK_HOVER_COLOR
+ {145, 112, 155, 255}, // B_LINK_VISITED_COLOR
+ {121, 142, 203, 255}, // B_LINK_ACTIVE_COLOR
// 100...
{46, 204, 64, 255}, // B_SUCCESS_COLOR
{255, 65, 54, 255}, // B_FAILURE_COLOR
@@ -110,6 +116,50 @@ static const rgb_color _kDefaultColors[kColorWhichCount] =
{
const rgb_color* BPrivate::kDefaultColors = &_kDefaultColors[0];


+static const char* kColorNames[kColorWhichCount] = {
+ "B_PANEL_BACKGROUND_COLOR",
+ "B_MENU_BACKGROUND_COLOR",
+ "B_WINDOW_TAB_COLOR",
+ "B_KEYBOARD_NAVIGATION_COLOR",
+ "B_DESKTOP_COLOR",
+ "B_MENU_SELECTED_BACKGROUND_COLOR",
+ "B_MENU_ITEM_TEXT_COLOR",
+ "B_MENU_SELECTED_ITEM_TEXT_COLOR",
+ "B_MENU_SELECTED_BORDER_COLOR",
+ "B_PANEL_TEXT_COLOR",
+ "B_DOCUMENT_BACKGROUND_COLOR",
+ "B_DOCUMENT_TEXT_COLOR",
+ "B_CONTROL_BACKGROUND_COLOR",
+ "B_CONTROL_TEXT_COLOR",
+ "B_CONTROL_BORDER_COLOR",
+ "B_CONTROL_HIGHLIGHT_COLOR",
+ "B_NAVIGATION_PULSE_COLOR",
+ "B_SHINE_COLOR",
+ "B_SHADOW_COLOR",
+ "B_TOOLTIP_BACKGROUND_COLOR",
+ "B_TOOLTIP_TEXT_COLOR",
+ "B_WINDOW_TEXT_COLOR",
+ "B_WINDOW_INACTIVE_TAB_COLOR",
+ "B_WINDOW_INACTIVE_TEXT_COLOR",
+ "B_WINDOW_BORDER_COLOR",
+ "B_WINDOW_INACTIVE_BORDER_COLOR",
+ "B_CONTROL_MARK_COLOR",
+ "B_LIST_BACKGROUND_COLOR",
+ "B_LIST_SELECTED_BACKGROUND_COLOR",
+ "B_LIST_ITEM_TEXT_COLOR",
+ "B_LIST_SELECTED_ITEM_TEXT_COLOR",
+ "B_SCROLL_BAR_THUMB_COLOR",
+ "B_LINK_TEXT_COLOR",
+ "B_LINK_HOVER_COLOR",
+ "B_LINK_VISITED_COLOR",
+ "B_LINK_ACTIVE_COLOR",
+ // 100...
+ "B_SUCCESS_COLOR",
+ "B_FAILURE_COLOR",
+ NULL
+};
+
+
namespace BPrivate {


@@ -1079,14 +1129,51 @@ ui_color(color_which which)
if (be_app != NULL) {
server_read_only_memory* shared
= BApplication::Private::ServerReadOnlyMemory();
- if (shared != NULL)
+ if (shared != NULL) {
+ // check for unset colors
+ if (shared->colors[index] == B_TRANSPARENT_COLOR)
+ shared->colors[index] = kDefaultColors[index];
+
return shared->colors[index];
+ }
}

return kDefaultColors[index];
}


+const char*
+ui_color_name(color_which which)
+{
+ // Suppress warnings for B_NO_COLOR.
+ if (which == B_NO_COLOR)
+ return NULL;
+
+ int32 index = color_which_to_index(which);
+ if (index < 0 || index >= kColorWhichCount) {
+ fprintf(stderr, "ui_color_name(): unknown color_which %d\n",
which);
+ return NULL;
+ }
+
+ return kColorNames[index];
+}
+
+
+color_which
+which_ui_color(const char* name)
+{
+ if (name == NULL)
+ return B_NO_COLOR;
+
+ for (int32 index = 0; index < kColorWhichCount; ++index) {
+ if (!strcmp(kColorNames[index], name))
+ return index_to_color_which(index);
+ }
+
+ return B_NO_COLOR;
+}
+
+
void
set_ui_color(const color_which &which, const rgb_color &color)
{
@@ -1096,7 +1183,10 @@ set_ui_color(const color_which &which, const rgb_color
&color)
return;
}

- BPrivate::AppServerLink link;
+ if (ui_color(which) == color)
+ return;
+
+ BPrivate::DesktopLink link;
link.StartMessage(AS_SET_UI_COLOR);
link.Attach<color_which>(which);
link.Attach<rgb_color>(color);
@@ -1104,6 +1194,48 @@ set_ui_color(const color_which &which, const rgb_color
&color)
}


+void
+set_ui_colors(const BMessage* colors)
+{
+ if (colors == NULL)
+ return;
+
+ int32 count = 0;
+ int32 index = 0;
+ char* name = NULL;
+ type_code type;
+ rgb_color color;
+ color_which which = B_NO_COLOR;
+
+ BPrivate::DesktopLink desktop;
+ if (desktop.InitCheck() != B_OK)
+ return;
+
+ desktop.StartMessage(AS_SET_UI_COLORS);
+ desktop.Attach<bool>(false);
+
+ // Only colors with names that map to system colors will get through.
+ while (colors->GetInfo(B_RGB_32_BIT_TYPE, index, &name, &type) == B_OK)
{
+
+ which = which_ui_color(name);
+ ++index;
+
+ if (which == B_NO_COLOR || colors->FindColor(name, &color) !=
B_OK)
+ continue;
+
+ desktop.Attach<color_which>(which);
+ desktop.Attach<rgb_color>(color);
+ ++count;
+ }
+
+ if (count == 0)
+ return;
+
+ desktop.Attach<color_which>(B_NO_COLOR);
+ desktop.Flush();
+}
+
+
rgb_color
tint_color(rgb_color color, float tint)
{
diff --git a/src/kits/interface/Jamfile b/src/kits/interface/Jamfile
index cec0540..1b48812 100644
--- a/src/kits/interface/Jamfile
+++ b/src/kits/interface/Jamfile
@@ -56,7 +56,6 @@ for architectureObject in [ MultiArchSubDirSetup ] {
CheckBox.cpp
ColorConversion.cpp
ColorControl.cpp
- ColorTools.cpp
Control.cpp
ControlLook.cpp
DecorInfo.cpp
diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp
index 0a0f2b4..21b563f 100644
--- a/src/kits/interface/View.cpp
+++ b/src/kits/interface/View.cpp
@@ -8,6 +8,7 @@
* Adrian Oanca, adioanca@xxxxxxxxxxxxx
* Ingo Weinhold. ingo_weinhold@xxxxxx
* Julian Harnath, julian.harnath@xxxxxxxxxxxxxx
+ * Joseph Groover, looncraz@xxxxxxxxxxxx
*/


@@ -141,6 +142,14 @@ ViewState::ViewState()
high_color = (rgb_color){ 0, 0, 0, 255 };
low_color = (rgb_color){ 255, 255, 255, 255 };
view_color = low_color;
+ which_view_color = B_NO_COLOR;
+ which_view_color_tint = B_NO_TINT;
+
+ which_high_color = B_NO_COLOR;
+ which_high_color_tint = B_NO_TINT;
+
+ which_low_color = B_NO_COLOR;
+ which_low_color_tint = B_NO_TINT;

pattern = B_SOLID_HIGH;
drawing_mode = B_OP_COPY;
@@ -220,6 +229,10 @@ ViewState::UpdateServerState(BPrivate::PortLink &link)
info.penSize = pen_size;
info.highColor = high_color;
info.lowColor = low_color;
+ info.whichHighColor = which_high_color;
+ info.whichLowColor = which_low_color;
+ info.whichHighColorTint = which_high_color_tint;
+ info.whichLowColorTint = which_low_color_tint;
info.pattern = pattern;
info.drawingMode = drawing_mode;
info.origin = origin;
@@ -456,7 +469,7 @@ BView::BView(BMessage* archive)
| B_FONT_SHEAR | B_FONT_ROTATION);
}

- int32 color;
+ int32 color = 0;
if (archive->FindInt32("_color", 0, &color) == B_OK)
SetHighColor(get_rgb_color(color));
if (archive->FindInt32("_color", 1, &color) == B_OK)
@@ -464,6 +477,29 @@ BView::BView(BMessage* archive)
if (archive->FindInt32("_color", 2, &color) == B_OK)
SetViewColor(get_rgb_color(color));

+ float tint = B_NO_TINT;
+ if (archive->FindInt32("_uicolor", 0, &color) == B_OK
+ && color != B_NO_COLOR) {
+ if (archive->FindFloat("_uitint", 0, &tint) != B_OK)
+ tint = B_NO_TINT;
+
+ SetHighUIColor((color_which)color, tint);
+ }
+ if (archive->FindInt32("_uicolor", 1, &color) == B_OK
+ && color != B_NO_COLOR) {
+ if (archive->FindFloat("_uitint", 1, &tint) != B_OK)
+ tint = B_NO_TINT;
+
+ SetLowUIColor((color_which)color, tint);
+ }
+ if (archive->FindInt32("_uicolor", 2, &color) == B_OK
+ && color != B_NO_COLOR) {
+ if (archive->FindFloat("_uitint", 2, &tint) != B_OK)
+ tint = B_NO_TINT;
+
+ SetViewUIColor((color_which)color, tint);
+ }
+
uint32 evMask;
uint32 options;
if (archive->FindInt32("_evmask", 0, (int32*)&evMask) == B_OK
@@ -595,6 +631,20 @@ BView::Archive(BMessage* data, bool deep) const
if (ret == B_OK)
ret = data->AddInt32("_color", get_uint32_color(ViewColor()));

+ if (ret == B_OK)
+ ret = data->AddInt32("_uicolor", (int32)HighUIColor());
+ if (ret == B_OK)
+ ret = data->AddInt32("_uicolor", (int32)LowUIColor());
+ if (ret == B_OK)
+ ret = data->AddInt32("_uicolor", (int32)ViewUIColor());
+
+ if (ret == B_OK)
+ ret = data->AddFloat("_uitint", fState->which_high_color_tint);
+ if (ret == B_OK)
+ ret = data->AddFloat("_uitint", fState->which_low_color_tint);
+ if (ret == B_OK)
+ ret = data->AddFloat("_uitint", fState->which_view_color_tint);
+
// NOTE: we do not use this flag any more
// if ( 1 ){
// ret = data->AddInt32("_dbuf", 1);
@@ -2304,6 +2354,8 @@ BView::PenSize() const
void
BView::SetHighColor(rgb_color color)
{
+ SetHighUIColor(B_NO_COLOR);
+
// are we up-to-date already?
if (fState->IsValid(B_VIEW_HIGH_COLOR_BIT)
&& fState->high_color == color)
@@ -2346,8 +2398,72 @@ BView::HighColor() const


void
+BView::SetHighUIColor(color_which which, float tint)
+{
+ if (fState->IsValid(B_VIEW_WHICH_HIGH_COLOR_BIT)
+ && fState->which_high_color == which
+ && fState->which_high_color_tint == tint)
+ return;
+
+ if (fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_SET_HIGH_UI_COLOR);
+ fOwner->fLink->Attach<color_which>(which);
+ fOwner->fLink->Attach<float>(tint);
+
+ fState->valid_flags |= B_VIEW_WHICH_HIGH_COLOR_BIT;
+ }
+
+ fState->which_high_color = which;
+ fState->which_high_color_tint = tint;
+
+ if (which != B_NO_COLOR) {
+ fState->archiving_flags |= B_VIEW_WHICH_HIGH_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_HIGH_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_HIGH_COLOR_BIT;
+
+ fState->high_color = tint_color(ui_color(which), tint);
+ } else {
+ fState->valid_flags &= ~B_VIEW_HIGH_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_WHICH_HIGH_COLOR_BIT;
+ }
+}
+
+
+color_which
+BView::HighUIColor(float* tint) const
+{
+ if (!fState->IsValid(B_VIEW_WHICH_HIGH_COLOR_BIT)
+ && fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_GET_HIGH_UI_COLOR);
+
+ int32 code;
+ if (fOwner->fLink->FlushWithReply(code) == B_OK
+ && code == B_OK) {
+
fOwner->fLink->Read<color_which>(&fState->which_high_color);
+
fOwner->fLink->Read<float>(&fState->which_high_color_tint);
+ fOwner->fLink->Read<rgb_color>(&fState->high_color);
+
+ fState->valid_flags |= B_VIEW_WHICH_HIGH_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_HIGH_COLOR_BIT;
+ }
+ }
+
+ if (tint != NULL)
+ *tint = fState->which_high_color_tint;
+
+ return fState->which_high_color;
+}
+
+
+void
BView::SetLowColor(rgb_color color)
{
+ SetLowUIColor(B_NO_COLOR);
+
if (fState->IsValid(B_VIEW_LOW_COLOR_BIT)
&& fState->low_color == color)
return;
@@ -2389,9 +2505,150 @@ BView::LowColor() const


void
+BView::SetLowUIColor(color_which which, float tint)
+{
+ if (fState->IsValid(B_VIEW_WHICH_LOW_COLOR_BIT)
+ && fState->which_low_color == which
+ && fState->which_low_color_tint == tint)
+ return;
+
+ if (fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_SET_LOW_UI_COLOR);
+ fOwner->fLink->Attach<color_which>(which);
+ fOwner->fLink->Attach<float>(tint);
+
+ fState->valid_flags |= B_VIEW_WHICH_LOW_COLOR_BIT;
+ }
+
+ fState->which_low_color = which;
+ fState->which_low_color_tint = tint;
+
+ if (which != B_NO_COLOR) {
+ fState->archiving_flags |= B_VIEW_WHICH_LOW_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_LOW_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_LOW_COLOR_BIT;
+
+ fState->low_color = tint_color(ui_color(which), tint);
+ } else {
+ fState->valid_flags &= ~B_VIEW_LOW_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_WHICH_LOW_COLOR_BIT;
+ }
+}
+
+
+color_which
+BView::LowUIColor(float* tint) const
+{
+ if (!fState->IsValid(B_VIEW_WHICH_LOW_COLOR_BIT)
+ && fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_GET_LOW_UI_COLOR);
+
+ int32 code;
+ if (fOwner->fLink->FlushWithReply(code) == B_OK
+ && code == B_OK) {
+
fOwner->fLink->Read<color_which>(&fState->which_low_color);
+
fOwner->fLink->Read<float>(&fState->which_low_color_tint);
+ fOwner->fLink->Read<rgb_color>(&fState->low_color);
+
+ fState->valid_flags |= B_VIEW_WHICH_LOW_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_LOW_COLOR_BIT;
+ }
+ }
+
+ if (tint != NULL)
+ *tint = fState->which_low_color_tint;
+
+ return fState->which_low_color;
+}
+
+
+bool
+BView::HasDefaultColors() const
+{
+ // If we don't have any of these flags, then we have default colors
+ uint32 testMask = B_VIEW_VIEW_COLOR_BIT | B_VIEW_HIGH_COLOR_BIT
+ | B_VIEW_LOW_COLOR_BIT | B_VIEW_WHICH_VIEW_COLOR_BIT
+ | B_VIEW_WHICH_HIGH_COLOR_BIT | B_VIEW_WHICH_LOW_COLOR_BIT;
+
+ return (fState->archiving_flags & testMask) == 0;
+}
+
+
+bool
+BView::HasSystemColors() const
+{
+ return fState->which_view_color == B_PANEL_BACKGROUND_COLOR
+ && fState->which_high_color == B_PANEL_TEXT_COLOR
+ && fState->which_low_color == B_PANEL_BACKGROUND_COLOR
+ && fState->which_view_color_tint == B_NO_TINT
+ && fState->which_high_color_tint == B_NO_TINT
+ && fState->which_low_color_tint == B_NO_TINT;
+}
+
+
+void
+BView::AdoptParentColors()
+{
+ AdoptViewColors(Parent());
+}
+
+
+void
+BView::AdoptSystemColors()
+{
+ SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
+ SetLowUIColor(B_PANEL_BACKGROUND_COLOR);
+ SetHighUIColor(B_PANEL_TEXT_COLOR);
+}
+
+
+void
+BView::AdoptViewColors(BView* view)
+{
+ if (view == NULL || !view->LockLooper())
+ return;
+
+ float tint = B_NO_TINT;
+ float viewTint = tint;
+ color_which viewWhich = view->ViewUIColor(&viewTint);
+
+ // View color
+ if (viewWhich != B_NO_COLOR)
+ SetViewUIColor(viewWhich, viewTint);
+ else
+ SetViewColor(view->ViewColor());
+
+ // Low color
+ color_which which = view->LowUIColor(&tint);
+ if (which != B_NO_COLOR)
+ SetLowUIColor(which, tint);
+ else if (viewWhich != B_NO_COLOR)
+ SetLowUIColor(viewWhich, viewTint);
+ else
+ SetLowColor(view->LowColor());
+
+ // High color
+ which = view->HighUIColor(&tint);
+ if (which != B_NO_COLOR)
+ SetHighUIColor(which, tint);
+ else
+ SetHighColor(view->HighColor());
+
+ view->UnlockLooper();
+}
+
+
+void
BView::SetViewColor(rgb_color color)
{
- if (fState->IsValid(B_VIEW_VIEW_COLOR_BIT) && fState->view_color ==
color)
+ SetViewUIColor(B_NO_COLOR);
+
+ if (fState->IsValid(B_VIEW_VIEW_COLOR_BIT)
+ && fState->view_color == color)
return;

if (fOwner) {
@@ -2432,6 +2689,71 @@ BView::ViewColor() const


void
+BView::SetViewUIColor(color_which which, float tint)
+{
+ if (fState->IsValid(B_VIEW_WHICH_VIEW_COLOR_BIT)
+ && fState->which_view_color == which
+ && fState->which_view_color_tint == tint)
+ return;
+
+ if (fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_SET_VIEW_UI_COLOR);
+ fOwner->fLink->Attach<color_which>(which);
+ fOwner->fLink->Attach<float>(tint);
+
+ fState->valid_flags |= B_VIEW_WHICH_VIEW_COLOR_BIT;
+ }
+
+ fState->which_view_color = which;
+ fState->which_view_color_tint = tint;
+
+ if (which != B_NO_COLOR) {
+ fState->archiving_flags |= B_VIEW_WHICH_VIEW_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_VIEW_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_VIEW_COLOR_BIT;
+
+ fState->view_color = tint_color(ui_color(which), tint);
+ } else {
+ fState->valid_flags &= ~B_VIEW_VIEW_COLOR_BIT;
+ fState->archiving_flags &= ~B_VIEW_WHICH_VIEW_COLOR_BIT;
+ }
+
+ if (!fState->IsValid(B_VIEW_WHICH_LOW_COLOR_BIT))
+ SetLowUIColor(which, tint);
+}
+
+
+color_which
+BView::ViewUIColor(float* tint) const
+{
+ if (!fState->IsValid(B_VIEW_WHICH_VIEW_COLOR_BIT)
+ && fOwner != NULL) {
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_GET_VIEW_UI_COLOR);
+
+ int32 code;
+ if (fOwner->fLink->FlushWithReply(code) == B_OK
+ && code == B_OK) {
+
fOwner->fLink->Read<color_which>(&fState->which_view_color);
+
fOwner->fLink->Read<float>(&fState->which_view_color_tint);
+ fOwner->fLink->Read<rgb_color>(&fState->view_color);
+
+ fState->valid_flags |= B_VIEW_WHICH_VIEW_COLOR_BIT;
+ fState->valid_flags |= B_VIEW_VIEW_COLOR_BIT;
+ }
+ }
+
+ if (tint != NULL)
+ *tint = fState->which_view_color_tint;
+
+ return fState->which_view_color;
+}
+
+
+void
BView::ForceFontAliasing(bool enable)
{
if (fState->IsValid(B_VIEW_FONT_ALIASING_BIT)
@@ -4100,6 +4422,35 @@ BView::Invalidate()


void
+BView::DelayedInvalidate(bigtime_t delay)
+{
+ DelayedInvalidate(delay, Bounds());
+}
+
+
+void
+BView::DelayedInvalidate(bigtime_t delay, BRect invalRect)
+{
+ if (fOwner == NULL)
+ return;
+
+ invalRect.left = (int)invalRect.left;
+ invalRect.top = (int)invalRect.top;
+ invalRect.right = (int)invalRect.right;
+ invalRect.bottom = (int)invalRect.bottom;
+ if (!invalRect.IsValid())
+ return;
+
+ _CheckLockAndSwitchCurrent();
+
+ fOwner->fLink->StartMessage(AS_VIEW_DELAYED_INVALIDATE_RECT);
+ fOwner->fLink->Attach<bigtime_t>(system_time() + delay);
+ fOwner->fLink->Attach<BRect>(invalRect);
+ fOwner->fLink->Flush();
+}
+
+
+void
BView::InvertRect(BRect rect)
{
if (fOwner) {
@@ -4598,6 +4949,11 @@ BView::MessageReceived(BMessage* message)
break;
}

+ // prevent message repeats
+ case B_COLORS_UPDATED:
+ case B_FONTS_UPDATED:
+ break;
+
default:
BHandler::MessageReceived(message);
break;

[ *** diff truncated: 3035 lines dropped *** ]


############################################################################

Commit: 11e54ef24cfc1dc4dddc47d4c7c69ad8483ed181
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:50 2015 UTC

LinkReceiver Fix

LinkReceiver would spin endlessly when given a timeout value which prevented
DelayedMessageSender from being operational.

----------------------------------------------------------------------------

############################################################################

Commit: c6da2f9360b667ca08d1ccfedcd4f09bfbf180a9
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:51 2015 UTC

ControlLook Colors

Enable better use of the proper colors, as well as overriding the
assumed proper colors for labels.

----------------------------------------------------------------------------

############################################################################

Commit: 5af02012c9157595eca9a1b29b552fd1cba5d142
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:53 2015 UTC

ColumnListView colors

ColumnListView now responds to system color changes.

----------------------------------------------------------------------------

############################################################################

Commit: f9f4d07bb415f42005e7f1716e41edd288091df2
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:55 2015 UTC

StatusBar colors

Add fInternalFlags and a single flag to denote the use of custom colors.
Have status bar use appropriate colors, either by adopting colors, or
by using system standard colors.
Live colors updates are also working.

----------------------------------------------------------------------------

############################################################################

Commit: 37df68803a2d4def98f94607038112f40712b59d
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:57 2015 UTC

BAboutWindow colors

----------------------------------------------------------------------------

############################################################################

Commit: f720ab7465069a7bb205397369dd82df3a2a6cf1
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:52:59 2015 UTC

BAlert colors

----------------------------------------------------------------------------

############################################################################

Commit: 68c262903a14c8677f30a1ec34adb17204c54898
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:00 2015 UTC

BBox colors

----------------------------------------------------------------------------

############################################################################

Commit: 2b7bf6d0af2549da4807874fa8ba14966d65a2ca
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:02 2015 UTC

BButton colors

BButton now properly uses the B_CONTROL_BACKGROUND_COLOR instead of
a darkened view color.

----------------------------------------------------------------------------

############################################################################

Commit: cb425880476122cda31d5fd00bb8738fbf0e78ad
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:04 2015 UTC

BControl colors

This includes simple changes to common controls.

----------------------------------------------------------------------------

############################################################################

Commit: 76f35cf780a3bc735c62b80b73f32fc7cfaacdf6
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:06 2015 UTC

AbstractSpinner colors

----------------------------------------------------------------------------

############################################################################

Commit: 7e20f65f4b9797d43e4bf107fa01a1a3c181dd02
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:08 2015 UTC

Menu colors

----------------------------------------------------------------------------

############################################################################

Commit: 54f33143ca5c4500dca7b1ea15f67bc5b2e7fdc4
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:10 2015 UTC

BListView colors

----------------------------------------------------------------------------

############################################################################

Commit: 817029e42a721423dd58b869f5876d2415c222bd
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:12 2015 UTC

BTabView colors

----------------------------------------------------------------------------

############################################################################

Commit: 5494a9ff4a0f2901af86d9fa221c601f97c0edda
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:14 2015 UTC

Specialized Layout Views colors

Views used by layout.

----------------------------------------------------------------------------

############################################################################

Commit: e4edbb0fe4fd3851046bcaa90712068a23137087
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:15 2015 UTC

Colors

----------------------------------------------------------------------------

############################################################################

Commit: c3f5779e21f522e2e0fafe3b9fdbf3ef563f1ab4
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:17 2015 UTC

ToolTip colors

----------------------------------------------------------------------------

############################################################################

Commit: 4471107ac944ece57f11386af847805f2fd971de
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:19 2015 UTC

Chart colors and some font awareness

Chart had horrible behavior with large fonts and many hardcoded colors.
This helps this situation immensely.

----------------------------------------------------------------------------

############################################################################

Commit: 284e18f2a6fe20f2b1e96c4929cdec7ce80c6478
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:22 2015 UTC

Tests color changes

Iteratively replace usage of Set*Color(ui_color... with Set*UIColor(...

----------------------------------------------------------------------------

############################################################################

Commit: e1d24c7dbb4ca0d5c47bd7611fd78c2e77707370
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:24 2015 UTC

Mail Deskbar Replicant colors

----------------------------------------------------------------------------

############################################################################

Commit: dbbe1646ef68691d4304aa13b16e4d205e46d386
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:26 2015 UTC

Bluetooth Deskbar Replicant colors

----------------------------------------------------------------------------

############################################################################

Commit: 1b31523213db06defa9b778784f73eaf6208d1fb
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:27 2015 UTC

Server UI colors

Iterative changes, mostly.

----------------------------------------------------------------------------

############################################################################

Commit: c12bd49e98ca8d29b2f90361d4128f649c3a0bc7
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:30 2015 UTC

Time Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 179c880e887545b8f6066d247948b5afb2820c7c
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:32 2015 UTC

Screensaver preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 0bc0555c4dca7f40c7ab8a8208e105cfacd1d58e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:33 2015 UTC

Screen Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 6e0177b22887443cc9debd5a5367fb056716f94e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:35 2015 UTC

Network Preflet Colors

----------------------------------------------------------------------------

############################################################################

Commit: cf488a51564b9bbeca2dd5d5fe520d310f748db3
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:37 2015 UTC

Mouse Preflet Colors

----------------------------------------------------------------------------

############################################################################

Commit: 7918aea4a722035984ccfeda26350fa2b2113bec
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:39 2015 UTC

Media System Colors

Preflet, replicant, and DefaultMediaTheme

----------------------------------------------------------------------------

############################################################################

Commit: f0b59946d1f2566f87d6bae740aabd951c902d60
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:41 2015 UTC

Mail Preflet Colors

----------------------------------------------------------------------------

############################################################################

Commit: d81bf5786807052acb22ff9685fc3e8cf54f29f3
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:43 2015 UTC

Locale Preflet Colors

----------------------------------------------------------------------------

############################################################################

Commit: f8ef12b86f62ac116a139906acbd4aac35259180
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:44 2015 UTC

Keymap colors

----------------------------------------------------------------------------

############################################################################

Commit: ca775d22890c111acf153871099328e81d68f72f
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:46 2015 UTC

Joysticks Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 3a45ee4b0df8b4a1f841960e86f68aebdc8d5c7d
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:48 2015 UTC

Font Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 1fe7a3c8d33717d70ca4d964e6ff251fcf2309e1
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:50 2015 UTC

FileTypes Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 7d87a56e1d1c70849eeb35bae1886c91b1ff02fe
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:53 2015 UTC

DataTranslation Preflet - and addons - colors

----------------------------------------------------------------------------

############################################################################

Commit: 68d753beb933f6cdc9144c9b6e7c35c70c9a412f
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:55 2015 UTC

Bluetooth Preflet colors

----------------------------------------------------------------------------

############################################################################

Commit: 2b2bfcade6dbb5a778e74bdc26b1c0ce7b52d4f9
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:56 2015 UTC

Appearance Color Handling Update

Use BMessage color support and new API.

----------------------------------------------------------------------------

############################################################################

Commit: 2573fafdfa206d05d11a49fbceb2136e2babbfd3
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:53:58 2015 UTC

Print System Colors

----------------------------------------------------------------------------

############################################################################

Commit: e7ff3ca378885962e5e19239caa3ddf7a9a280c5
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:01 2015 UTC

Tracker uses new API, Improved Font Awareness

InfoWindow now uses the font size to determine the window size and
placement of elements. Also uses syste colors, including link
colors. Permissions view not font sensitive at this time.

----------------------------------------------------------------------------

############################################################################

Commit: 859078840234b3fa81f771b518cbb19654472a18
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:03 2015 UTC

Mail kit colors

----------------------------------------------------------------------------

############################################################################

Commit: ef1cfd4dcfa11fd704948b7316d181f511efee8b
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:05 2015 UTC

ToolBar Colors

This was a bigger change than many others as BButton now defaults to using
control background colors, and we can not do that here without the buttons
not appearing as we desire (blending in with the toolbar).

Using the control background color for the toolbar would be unacceptable.

----------------------------------------------------------------------------

############################################################################

Commit: 8baab93e83094be848428dfedee856a7b6540889
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:07 2015 UTC

Shared UI element colors

----------------------------------------------------------------------------

############################################################################

Commit: f36e91702d29766845ce4b29b05e9236fd503824
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:08 2015 UTC

Bluetooth Incoming Connection colors

----------------------------------------------------------------------------

############################################################################

Commit: 13caefe409c9d7ceebb864f6f4e1da090c1bb258
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:10 2015 UTC

/bin colors

----------------------------------------------------------------------------

############################################################################

Commit: ef1a2a6690edc75646a38a4e0725b2ac3975750e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:12 2015 UTC

WebPositive Colors

Use system colors, ensure that we don't rely on view having a default
white background when using the layout API (DownloadProgressView)

----------------------------------------------------------------------------

############################################################################

Commit: 47596f4b6b1eeb6da0a6510b2954883f2e4b6718
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:14 2015 UTC

Terminal colors

When resizing a window, we need to ensure the low color and the view color are
the same,
otherwise the drawing results will be unpleasant.

Here, I decided to use the user Terminal colors rather than a system color.

----------------------------------------------------------------------------

############################################################################

Commit: c5a560f278ab5b22d0c65a51392d57de90b048b9
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:16 2015 UTC

Switcher colors

----------------------------------------------------------------------------

############################################################################

Commit: a5ce70e83ba6337509e32760bdb421900444a526
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:17 2015 UTC

Sudoku colors

----------------------------------------------------------------------------

############################################################################

Commit: d23e8492324202e3f047835142c84ea02bf5856c
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:19 2015 UTC

StyledEdit colors

----------------------------------------------------------------------------

############################################################################

Commit: 2a1038f5ed891c7469c1e74b4254d245c6ee9550
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:21 2015 UTC

SoundRecorder colors

I lack the hardware to fully adapt this program at this time.

----------------------------------------------------------------------------

############################################################################

Commit: b26b473a8dc03ae47dd04087d5fc97ecb3049839
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:23 2015 UTC

ShowImage colors

----------------------------------------------------------------------------

############################################################################

Commit: 50bb3fa82528cc8513d1cde7e5d7b8fb9a8a63c7
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:24 2015 UTC

Screenshot window colors

----------------------------------------------------------------------------

############################################################################

Commit: 5495543f265e99c7af2c155ea0ad16e9fabbf34d
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:26 2015 UTC

resedit colors

----------------------------------------------------------------------------

############################################################################

Commit: e0cce2e16731351b8c4790d6498557cb63ddd48d
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:28 2015 UTC

Pulse colors

----------------------------------------------------------------------------

############################################################################

Commit: 3de2251303c405ab46d862e65119dbee3a7e9094
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:30 2015 UTC

ProcessController colors

----------------------------------------------------------------------------

############################################################################

Commit: 8d774d878828b18b05efc82bb3fd16d04e8b8c86
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:32 2015 UTC

PowerStatus colors

----------------------------------------------------------------------------

############################################################################

Commit: 8171ff9956be09ccfd0763fec5d6ec9627922e7e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:33 2015 UTC

PatchBay Colors

----------------------------------------------------------------------------

############################################################################

Commit: 6c23d19849e56dec20900142fa72296d617f0f5e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:35 2015 UTC

Pairs colors

----------------------------------------------------------------------------

############################################################################

Commit: 60408b7db1603e3fb2982f4704bfe8bd01ce4cc1
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:37 2015 UTC

PackageInstaller colors

----------------------------------------------------------------------------

############################################################################

Commit: 3fef11a0e843818449312a48463131f9b9a0de13
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:38 2015 UTC

OverlayImage app colors

----------------------------------------------------------------------------

############################################################################

Commit: 61b6a4f6aeeb5f8257582751f193e30d4d4e1ef7
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:40 2015 UTC

Network Status Colors

----------------------------------------------------------------------------

############################################################################

Commit: f52ed59669182c994c6e7110d889d757a26edaef
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:42 2015 UTC

MediaPlayer colors

----------------------------------------------------------------------------

############################################################################

Commit: e5614d7ff6b5551468c94847d84713c272f06388
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:44 2015 UTC

Mail application colors

----------------------------------------------------------------------------

############################################################################

Commit: a10be3027301950e558966f70764b3a03f7acc25
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:46 2015 UTC

Magnify app colors

----------------------------------------------------------------------------

############################################################################

Commit: f33c14602c75bbb947c72e97588ea23793b4febc
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:47 2015 UTC

Login UI rework

Improve placement with different font sizes, and use user colors.

----------------------------------------------------------------------------

############################################################################

Commit: 8aeccc39acb7c1bc09e9c4fcc08fc47fe72475a9
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:49 2015 UTC

Install application colors

Also better placement of text when official logo is absent.

----------------------------------------------------------------------------

############################################################################

Commit: ac700aaad166567ddd0c15103d525c2fec846197
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:51 2015 UTC

Uninstaller colors

----------------------------------------------------------------------------

############################################################################

Commit: 679a89608e902e9cec638efeb04b46f627fa23e7
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:53 2015 UTC

Icon-o-Matic colors

----------------------------------------------------------------------------

############################################################################

Commit: 4f53c29b65bddcc51049664f43cd6fe9da4e2913
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:55 2015 UTC

HaikuDepot colors

This application proved the most difficult to get to use system colors.
It uses a specialized text handling system that does not expose the
ability to change text or background colors at any point.

After discussing at length with the original author it was discovered
that the system is not working as originally intended and fixing it is
beyond the scope of this commit. As such, I added the ability for this
system to use color defined constants so that it can update with system
color changes. I also removed its use from the package list view, as
there was no way to override the color choices to make the MarkupTextView
fit in properly with list colors. This, however, is a non issue as BTextView
has every needed capability for the short description.

In addition to using system colors and live updates, I took it upon myself
to improve the legibility of the user ratings view. A faint line now separates
each rating, and the rating bars use the control mark color so that they stand
out as something other than a drawing error (which is what I thought it was for
a long time).

----------------------------------------------------------------------------

############################################################################

Commit: d68888f9b2081e4b0660b5470105e55f56a4ba75
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:57 2015 UTC

FontDemo colors

----------------------------------------------------------------------------

############################################################################

Commit: 545807023e486059c85878b933fffb0d256cf3f6
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:54:59 2015 UTC

FirstBootPrompt colors and size

Intelligently use font size to set the window size.

----------------------------------------------------------------------------

############################################################################

Commit: 633a930ace88829b1dcbb244982644f7f5fb4d7e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:01 2015 UTC

Expander colors

----------------------------------------------------------------------------

############################################################################

Commit: e91529000ce5f5756b9fe84e3e1cc283ec238465
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:02 2015 UTC

DriveSetup colors

----------------------------------------------------------------------------

############################################################################

Commit: c4fd5d93dd07c838d5e579749b0902b52253ad8e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:04 2015 UTC

DiskProbe colors

----------------------------------------------------------------------------

############################################################################

Commit: 95eb83083338c0fcd4cdce92e8f01748f9a761cd
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:06 2015 UTC

Device app colors

----------------------------------------------------------------------------

############################################################################

Commit: 8ca0c8146a2b720637bab880111616db152ed780
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:08 2015 UTC

Deskbar colors

----------------------------------------------------------------------------

############################################################################

Commit: 110281a95b36dd4e2fe42c35b02fff137ff1cfd2
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:10 2015 UTC

DeskCalc colors

Due to the button color logic, we use the rgb_color Brightness to determine
the label colors.

----------------------------------------------------------------------------

############################################################################

Commit: 407db3955e1965ede84c3ea8e15840d60c08616c
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:12 2015 UTC

Debugger colors

----------------------------------------------------------------------------

############################################################################

Commit: 7d95faa496789f0f110814a3d01cd7a9913225e1
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:13 2015 UTC

CharacterMap colors

----------------------------------------------------------------------------

############################################################################

Commit: 29680c32d879d4fb42189e02c493b4a051781c1a
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:15 2015 UTC

BootManager colors, size

Use system colors, intelligently size window according to the font size.

----------------------------------------------------------------------------

############################################################################

Commit: eb0a21ca996d9cbfb6f6b8aed2f332636ac97678
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:17 2015 UTC

ActivityMonitor colors

----------------------------------------------------------------------------

############################################################################

Commit: e3353c90b3a3c7b70d54d05e639d535af3a71827
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:19 2015 UTC

AboutSystem colors

Use slightly different colors for heading text than for subheading text.
Change uptime view from a BTextView to a BStringView. This fixes the issue
where the AboutWindow did not properly fit its contents.

----------------------------------------------------------------------------

############################################################################

Commit: b8a3eab4b33c33f7f09c1bcc0d8a80cca8b0e3e0
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:21 2015 UTC

ScreenSaver add-on prefefernce view colors

----------------------------------------------------------------------------

############################################################################

Commit: 30e5c6fea0beb4540728c41d2765bdb1bed49faa
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:23 2015 UTC

Print server add-ons' colors

----------------------------------------------------------------------------

############################################################################

Commit: d19e5b4b136784978eaa8db59874fa367245cd91
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:25 2015 UTC

Mail daemon addon colors

----------------------------------------------------------------------------

############################################################################

Commit: f9b0977d34cdad69d018570995a79ecc27f8545e
Author: looncraz <looncraz@xxxxxxxxxxxx>
Date: Thu Dec 10 18:55:26 2015 UTC

TeamMonitorWindow colors

----------------------------------------------------------------------------


Other related posts:

  • » [haiku-commits] BRANCH looncraz-github.setviewuicolor [f9b0977d34cd] in src: servers/app kits/interface apps preferences/appearance . - looncraz-github . setviewuicolor