Closed
Bug 1979
Opened 26 years ago
Closed 26 years ago
Corner of scrolling view not drawn with system colour
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: michael.j.lowe, Assigned: michaelp)
Details
The corner of scrolling views are not drawn with the system colour. Here is a
patch to fix it:
Index: nsScrollingView.cpp
===================================================================
RCS file: /cvsroot/mozilla/view/src/nsScrollingView.cpp,v
retrieving revision 3.72
diff -u -r3.72 nsScrollingView.cpp
--- nsScrollingView.cpp 1998/12/15 05:47:25 3.72
+++ nsScrollingView.cpp 1998/12/18 17:55:00
@@ -28,6 +28,7 @@
#include "nsViewsCID.h"
#include "nsIScrollableView.h"
#include "nsIFrame.h"
+#include "nsILookAndFeel.h"
static inline PRBool
ViewIsShowing(nsIView *aView)
@@ -42,6 +43,8 @@
static NS_DEFINE_IID(kIScrollableViewIID, NS_ISCROLLABLEVIEW_IID);
static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID);
+static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
+static NS_DEFINE_IID(kILookAndFeelIID, NS_ILOOKANDFEEL_IID);
//----------------------------------------------------------------------
@@ -257,7 +260,13 @@
if (clipres == PR_FALSE)
{
- rc.SetColor(NS_RGB(192, 192, 192));
+ nscolor bgColor = NS_RGB(192,192,192);
+ nsILookAndFeel * lookAndFeel;
+ if (NS_OK == nsRepository::CreateInstance(kLookAndFeelCID, nsnull,
kILookAndFeelIID, (void**)&lookAndFeel)) {
+ lookAndFeel->GetColor(nsILookAndFeel::eColor_WidgetBackground,
bgColor);
+ }
+
+ rc.SetColor(bgColor);
rc.FillRect(brect);
if (PR_TRUE == mShowQuality)
Updated•26 years ago
|
Assignee: karnaze → michaelp
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
thanks michael. i've added in your fix in slightly modified form. the change
prevents resource leaks and unnecessary memory thrashing.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•