* Added some of the rgb_color methods from Dano/Zeta.
* The private general_info structure is now setup - that fixes a part of bug #502; NetPositive's bar remains black, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17160 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -80,6 +80,16 @@ typedef struct rgb_color {
|
|||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
// some convenient additions
|
// some convenient additions
|
||||||
|
|
||||||
|
inline rgb_color&
|
||||||
|
set_to(uint8 r, uint8 g, uint8 b, uint8 a = 255)
|
||||||
|
{
|
||||||
|
red = r;
|
||||||
|
green = g;
|
||||||
|
blue = b;
|
||||||
|
alpha = a;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
operator==(const rgb_color& other) const
|
operator==(const rgb_color& other) const
|
||||||
{
|
{
|
||||||
@@ -94,6 +104,15 @@ typedef struct rgb_color {
|
|||||||
#endif
|
#endif
|
||||||
} rgb_color;
|
} rgb_color;
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
inline rgb_color
|
||||||
|
make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha = 255)
|
||||||
|
{
|
||||||
|
rgb_color color = {red, green, blue, alpha};
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
extern _IMPEXP_BE const rgb_color B_TRANSPARENT_COLOR;
|
extern _IMPEXP_BE const rgb_color B_TRANSPARENT_COLOR;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
#include <input_globals.h>
|
#include <input_globals.h>
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
#include <WidthBuffer.h>
|
#include <WidthBuffer.h>
|
||||||
#include <ColorTools.h>
|
|
||||||
|
|
||||||
#include "moreUTF8.h"
|
#include "moreUTF8.h"
|
||||||
#include "truncate_string.h"
|
#include "truncate_string.h"
|
||||||
@@ -687,8 +686,7 @@ mouse_mode()
|
|||||||
_IMPEXP_BE rgb_color
|
_IMPEXP_BE rgb_color
|
||||||
ui_color(color_which which)
|
ui_color(color_which which)
|
||||||
{
|
{
|
||||||
if(be_app) {
|
if (be_app) {
|
||||||
|
|
||||||
rgb_color color;
|
rgb_color color;
|
||||||
BPrivate::AppServerLink link;
|
BPrivate::AppServerLink link;
|
||||||
link.StartMessage(AS_GET_UI_COLOR);
|
link.StartMessage(AS_GET_UI_COLOR);
|
||||||
@@ -783,8 +781,7 @@ rgb_color shift_color(rgb_color color, float shift);
|
|||||||
rgb_color
|
rgb_color
|
||||||
shift_color(rgb_color color, float shift)
|
shift_color(rgb_color color, float shift)
|
||||||
{
|
{
|
||||||
// TODO: dunno what this is supposed to do, but BeIDE expects it to be there...
|
return tint_color(color, shift);
|
||||||
return color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -823,6 +820,12 @@ _init_interface_kit_()
|
|||||||
_menu_info_ptr_ = &BMenu::sMenuInfo;
|
_menu_info_ptr_ = &BMenu::sMenuInfo;
|
||||||
status_t status = load_menu_settings(BMenu::sMenuInfo);
|
status_t status = load_menu_settings(BMenu::sMenuInfo);
|
||||||
|
|
||||||
|
general_info.background_color = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
general_info.mark_color.set_to(0, 0, 0);
|
||||||
|
general_info.highlight_color = ui_color(B_CONTROL_HIGHLIGHT_COLOR);
|
||||||
|
general_info.window_frame_color = ui_color(B_WINDOW_TAB_COLOR);
|
||||||
|
general_info.color_frame = true;
|
||||||
|
|
||||||
// TODO: fill the other static members
|
// TODO: fill the other static members
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user