I have a header panel that I want to give my own look, not one of the predefined color schemes. To be able to do this I have set the following properties:
- BorderColor to some custom color
- Headercolor to some custom color
- set a custom HeaderFont
- removed hoColorSchemeFont from the options
- set AdaptiveColors to FALSE
This works fine, except for the line just under the Header itself. This seems to keep following the color from the colorscheme that you set in the ColorScheme property. (In the example picture it is set to csDefault, which is csBlue in my case)
It does this when the property HeaderStyle is set to psNormal and psWindowsLive. It seems fine with the other Header styles.
An example of the problem:
Am I missing a property, or is this a bug in the NxHeaderComponent?
Regards,
Stijn.
NxHeaderPanel - border beneath header has incorrect color
Started by Xillion, Dec 01 2010 03:48 PM
4 replies to this topic
#1
Posted 01 December 2010 - 03:48 PM
#2
Posted 01 December 2010 - 10:42 PM
Hello Stijn,
Try to set ColorScheme property to Silver or Silver2010
I hope that this helps.
Best regards
Try to set ColorScheme property to Silver or Silver2010
I hope that this helps.
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 02 December 2010 - 12:27 PM
Hello Boki,
As always, thanks for the swift reply. (Do you actually take vakantions or days of? )
That has been my workaround so far. However, when using Silver or Silver 2010 then the line is colored gray as far as I can see. That only solves the problem partially because it doesn't show that much that the line is in another color. That might work in the colors I used in my example, but using other colors this will stand out. This is an issue for me because we have developped theming components for our application.
It would be great if it followed the colour that is set in the BorderColor property, which in my opinion seems the logical thing. (Escecially with AdaptiveColors set to false).
Regards,
Stijn.
As always, thanks for the swift reply. (Do you actually take vakantions or days of? )
That has been my workaround so far. However, when using Silver or Silver 2010 then the line is colored gray as far as I can see. That only solves the problem partially because it doesn't show that much that the line is in another color. That might work in the colors I used in my example, but using other colors this will stand out. This is an issue for me because we have developped theming components for our application.
It would be great if it followed the colour that is set in the BorderColor property, which in my opinion seems the logical thing. (Escecially with AdaptiveColors set to false).
Regards,
Stijn.
#4
Posted 05 December 2010 - 07:27 PM
Hello Stijn,
What do you think about next change:
Best regards
What do you think about next change:
CODE
procedure TNxHeaderPanel.DrawWindowsLiveHeader(const HeaderRect: TRect);
var
DrawColor: TColor;
InnerRect: TRect;
begin
case FAdaptiveColors of
True: DrawColor := SchemeColor(seInactiveDockCaption, FColorScheme);
else DrawColor := FHeaderColor;
end;
InnerRect := HeaderRect;
with Canvas do
begin
Pen.Color := clWhite;
Polyline([
Point(0, HeaderRect.Top),
Point(ClientWidth, HeaderRect.Top)]);
Polyline([
Point(0, HeaderRect.Bottom - 2),
Point(ClientWidth, HeaderRect.Bottom - 2)]);
if AdaptiveColors then Pen.Color := SchemeColor(seInactiveDockCaption, FColorScheme)
else Pen.Color := BorderColor; // <--------------------- changed
Polyline([Point(0, HeaderRect.Bottom - 1), Point(ClientWidth, HeaderRect.Bottom - 1)]);
InflateRect(InnerRect, 0, -1);
Dec(InnerRect.Bottom);
DrawVertShine(Canvas, InnerRect, DrawColor, Color, (InnerRect.Bottom - InnerRect.Top) div 2);
end;
end;
var
DrawColor: TColor;
InnerRect: TRect;
begin
case FAdaptiveColors of
True: DrawColor := SchemeColor(seInactiveDockCaption, FColorScheme);
else DrawColor := FHeaderColor;
end;
InnerRect := HeaderRect;
with Canvas do
begin
Pen.Color := clWhite;
Polyline([
Point(0, HeaderRect.Top),
Point(ClientWidth, HeaderRect.Top)]);
Polyline([
Point(0, HeaderRect.Bottom - 2),
Point(ClientWidth, HeaderRect.Bottom - 2)]);
if AdaptiveColors then Pen.Color := SchemeColor(seInactiveDockCaption, FColorScheme)
else Pen.Color := BorderColor; // <--------------------- changed
Polyline([Point(0, HeaderRect.Bottom - 1), Point(ClientWidth, HeaderRect.Bottom - 1)]);
InflateRect(InnerRect, 0, -1);
Dec(InnerRect.Bottom);
DrawVertShine(Canvas, InnerRect, DrawColor, Color, (InnerRect.Bottom - InnerRect.Top) div 2);
end;
end;
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 15 December 2010 - 05:23 PM
Hello Boki,
My apologies for the late reaction. Somehow I don't get e-mail notifications from the forum and I lost track of this topic.
That change is indeed the solution. and the border draws fine now.
For drawing the complete border around the NxHeaderpanel you do the same thing in the TNxHeaderPanel.RedrawBorder method:
It's doesn't seem consistent that there is a check for the Adaptivecolors property in the RedrawBorder function, but not in the orignal DrawWindowsLiveHeader and DrawNormalHeader functions.
Are you going to implement this as a fix in future releases?
Regards,
Stijn.
My apologies for the late reaction. Somehow I don't get e-mail notifications from the forum and I lost track of this topic.
That change is indeed the solution. and the border draws fine now.
For drawing the complete border around the NxHeaderpanel you do the same thing in the TNxHeaderPanel.RedrawBorder method:
CODE
if AdaptiveColors then
begin
BR := CreateSolidBrush(ColorToRGB(SchemeColor(seBorder, FColorScheme)));
end else BR := CreateSolidBrush(ColorToRGB(FBorderColor));
begin
BR := CreateSolidBrush(ColorToRGB(SchemeColor(seBorder, FColorScheme)));
end else BR := CreateSolidBrush(ColorToRGB(FBorderColor));
It's doesn't seem consistent that there is a check for the Adaptivecolors property in the RedrawBorder function, but not in the orignal DrawWindowsLiveHeader and DrawNormalHeader functions.
Are you going to implement this as a fix in future releases?
Regards,
Stijn.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users