Changeset 7500 for trunk/src/user32


Ignore:
Timestamp:
Nov 30, 2001, 2:53:50 PM (24 years ago)
Author:
sandervl
Message:

change menu hilite background color in OS/2 look mode

Location:
trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/menu.cpp

    r7446 r7500  
    1 /* $Id: menu.cpp,v 1.41 2001-11-24 13:55:13 sandervl Exp $*/
     1/* $Id: menu.cpp,v 1.42 2001-11-30 13:53:49 sandervl Exp $*/
    22/*
    33 * Menu functions
     
    3636#include "win32wmisc.h"
    3737#include "oslibmsg.h"
     38#include "oslibwin.h"
     39#include "syscolor.h"
    3840
    3941#define DBG_LOCALLOG    DBG_menu
     
    11501152
    11511153    if ((lpitem->fState & MF_HILITE) && !(IS_BITMAP_ITEM(lpitem->fType)))
     1154#ifdef __WIN32OS2__
     1155            if(fOS2Look)
     1156                 FillRect( hdc, &rect, GetOS2ColorBrush(PMSYSCLR_MENUHILITEBGND) );
     1157            else FillRect( hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT) );
     1158#else
    11521159            FillRect( hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT) );
     1160#endif
    11531161    else {
    11541162        //SvL: TODO: Bug in GDI32; draws black rectangle instead of menu color
  • trunk/src/user32/oslibwin.cpp

    r7063 r7500  
    1 /* $Id: oslibwin.cpp,v 1.109 2001-10-15 17:09:03 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.110 2001-11-30 13:53:49 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    10691069//******************************************************************************
    10701070//******************************************************************************
     1071ULONG  OSLibWinQuerySysColor(int index)
     1072{
     1073    return CONVERT_RGB(WinQuerySysColor(HWND_DESKTOP, index, 0));
     1074}
     1075//******************************************************************************
     1076//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r6395 r7500  
    1 /* $Id: oslibwin.h,v 1.61 2001-07-28 13:43:53 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.62 2001-11-30 13:53:50 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    351351BOOL   OSLibWinShowPointer(BOOL fShow);
    352352
     353
     354   #define PMSYSCLR_SHADOWHILITEBGND         (-50L)
     355   #define PMSYSCLR_SHADOWHILITEFGND         (-49L)
     356   #define PMSYSCLR_SHADOWTEXT               (-48L)
     357   #define PMSYSCLR_ENTRYFIELD               (-47L)
     358   #define PMSYSCLR_MENUDISABLEDTEXT         (-46L)
     359   #define PMSYSCLR_MENUHILITE               (-45L)
     360   #define PMSYSCLR_MENUHILITEBGND           (-44L)
     361   #define PMSYSCLR_PAGEBACKGROUND           (-43L)
     362   #define PMSYSCLR_FIELDBACKGROUND          (-42L)
     363   #define PMSYSCLR_BUTTONLIGHT              (-41L)
     364   #define PMSYSCLR_BUTTONMIDDLE             (-40L)
     365   #define PMSYSCLR_BUTTONDARK               (-39L)
     366   #define PMSYSCLR_BUTTONDEFAULT            (-38L)
     367   #define PMSYSCLR_TITLEBOTTOM              (-37L)
     368   #define PMSYSCLR_SHADOW                   (-36L)
     369   #define PMSYSCLR_ICONTEXT                 (-35L)
     370   #define PMSYSCLR_DIALOGBACKGROUND         (-34L)
     371   #define PMSYSCLR_HILITEFOREGROUND         (-33L)
     372   #define PMSYSCLR_HILITEBACKGROUND         (-32L)
     373   #define PMSYSCLR_INACTIVETITLETEXTBGND    (-31L)
     374   #define PMSYSCLR_ACTIVETITLETEXTBGND      (-30L)
     375   #define PMSYSCLR_INACTIVETITLETEXT        (-29L)
     376   #define PMSYSCLR_ACTIVETITLETEXT          (-28L)
     377   #define PMSYSCLR_OUTPUTTEXT               (-27L)
     378   #define PMSYSCLR_WINDOWSTATICTEXT         (-26L)
     379   #define PMSYSCLR_SCROLLBAR                (-25L)
     380   #define PMSYSCLR_BACKGROUND               (-24L)
     381   #define PMSYSCLR_ACTIVETITLE              (-23L)
     382   #define PMSYSCLR_INACTIVETITLE            (-22L)
     383   #define PMSYSCLR_MENU                     (-21L)
     384   #define PMSYSCLR_WINDOW                   (-20L)
     385   #define PMSYSCLR_WINDOWFRAME              (-19L)
     386   #define PMSYSCLR_MENUTEXT                 (-18L)
     387   #define PMSYSCLR_WINDOWTEXT               (-17L)
     388   #define PMSYSCLR_TITLETEXT                (-16L)
     389   #define PMSYSCLR_ACTIVEBORDER             (-15L)
     390   #define PMSYSCLR_INACTIVEBORDER           (-14L)
     391   #define PMSYSCLR_APPWORKSPACE             (-13L)
     392   #define PMSYSCLR_HELPBACKGROUND           (-12L)
     393   #define PMSYSCLR_HELPTEXT                 (-11L)
     394   #define PMSYSCLR_HELPHILITE               (-10L)
     395
     396   #define PMSYSCLR_CSYSCOLORS               41L
     397   #define PMSYSCLR_BASE                     50L
     398
     399#define CONVERT_RGB(colorRef) ( ((colorRef) & 0x0000FF00     )   |   \
     400                                (((colorRef) & 0x00FF0000)>>16)  |   \
     401                                (((colorRef) & 0x000000FF)<<16)   )
     402
     403ULONG  OSLibWinQuerySysColor(int index);
     404
    353405#endif //__OSLIBWIN_H__
  • trunk/src/user32/syscolor.cpp

    r7063 r7500  
    1 /* $Id: syscolor.cpp,v 1.30 2001-10-15 17:09:04 sandervl Exp $ */
     1/* $Id: syscolor.cpp,v 1.31 2001-11-30 13:53:50 sandervl Exp $ */
    22
    33/*
     
    2424#include "syscolor.h"
    2525#include "options.h"
     26#include "oslibwin.h"
    2627
    2728#define DBG_LOCALLOG    DBG_syscolor
     
    266267  return GetStockObject(LTGRAY_BRUSH);
    267268}
     269//******************************************************************************
     270HBRUSH OS2SysColorBrush[PMSYSCLR_CSYSCOLORS] = {0};
     271//******************************************************************************
     272HBRUSH WIN32API GetOS2ColorBrush(int nIndex)
     273{
     274  dprintf(("GetOS2ColorBrush %d", nIndex));
     275  nIndex += PMSYSCLR_BASE;
     276  if( ((nIndex < 0) || (nIndex >= PMSYSCLR_CSYSCOLORS))  ) {
     277      DebugInt3();
     278      return 0;
     279  }
     280
     281  if(OS2SysColorBrush[nIndex]) return OS2SysColorBrush[nIndex];
     282
     283  ULONG color = OSLibWinQuerySysColor(nIndex-PMSYSCLR_BASE);
     284  dprintf(("color %x", color));
     285  OS2SysColorBrush[nIndex] = CreateSolidBrush(color);
     286
     287  return OS2SysColorBrush[nIndex];
     288}
    268289/***********************************************************************
    269290 * This function is new to the Wine lib -- it does not exist in
  • trunk/src/user32/syscolor.h

    r5951 r7500  
    1 /* $Id: syscolor.h,v 1.14 2001-06-10 12:05:40 sandervl Exp $ */
     1/* $Id: syscolor.h,v 1.15 2001-11-30 13:53:50 sandervl Exp $ */
    22
    33/*
     
    1212#define __WINE_SYSCOLOR_H
    1313
    14 BOOL   WIN32API OS2UpdateWindow(HWND hwnd);
    15 HBRUSH WIN32API OS2GetSysColorBrush(int nIndex);
     14HBRUSH WIN32API GetOS2ColorBrush(int nIndex);
    1615
    1716extern void SYSCOLOR_Init(int fOverride = -1);
Note: See TracChangeset for help on using the changeset viewer.