Ribbon tab color MICROSOFT OFFICE 2016
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Silvio,
very niceSilvio.Falconi wrote:Please try this styleCode: Select all
#include "Fivewin.ch" #include "Ribbon.ch" #define COLOR_MENUHILIGHT 29 //051,153,255 #define COLOR_MENUBAR 30 //240,240,240 FUNCTION MAIN() LOCAL oWnd, oRBar, oRGrp, oBtn1 DEFINE WINDOW oWnd DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 163 TOPMARGIN 45 2015 oRBar:aClrTabTxt = { { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) },; { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) },; { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) } } oRBar:nClrPaneRB = GetSysColor( COLOR_MENUHILIGHT ) oRBar:aGradFld = { || { { 1, CLR_WHITE, CLR_WHITE } } } oRBar:aGradOver = { || { { 1, GetSysColor( COLOR_MENUHILIGHT ) , GetSysColor( COLOR_MENUHILIGHT ) } } } ADD GROUP oRGrp RIBBONBAR oRBar; TO OPTION 1 oRGrp:aGradCaption = { { 1, CLR_WHITE, CLR_WHITE } } @ 2, 2 ADD BUTTON oBtn1 GROUP oRGrp ; SIZE oRGrp:nWidth / 2, oRGrp:nHeight - 18 ; action msginfo() oBtn1:bClrGradNormal = { | lPressed | If( lPressed,; { { 1, RGB( 197, 197, 197 ), RGB( 197, 197, 197 ) } },; { { 1, CLR_WHITE, CLR_WHITE } } ) } ACTIVATE WINDOW oWnd RETURN NIL
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Probably you added one or more items to the folder without adjusting aClrTabTxt accordingly.
EMG
EMG
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Ribbon tab color MICROSOFT OFFICE 2016
Antonio,
I wish arrived as this
https://support.office.com/en-us/articl ... 5f54672310
please see the Dark gray theme
there is not the line on the bottom
I wish arrived as this
https://support.office.com/en-us/articl ... 5f54672310
please see the Dark gray theme
there is not the line on the bottom
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Ribbon tab color MICROSOFT OFFICE 2016
Antonio,
I think we can change these lines ( METHOD Paint() CLASS TRibbonBar )
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
because ::nClrPaneRB give the color to all ribbonbar but the line is down the group must be the same color of the back of the tab
Or
we must change the height of tab
I think we can change these lines ( METHOD Paint() CLASS TRibbonBar )
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
because ::nClrPaneRB give the color to all ribbonbar but the line is down the group must be the same color of the back of the tab
Or
we must change the height of tab
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Silvio,
I have tried this:
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
but then the color of those bottom lines is black
> because ::nClrPaneRB give the color to all ribbonbar but the line is down the group must be the same color of the back of the tab
What brush should we use for that black area ? I don't think that we should use the same color of the back of the current selected tab
I have tried this:
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
but then the color of those bottom lines is black
> because ::nClrPaneRB give the color to all ribbonbar but the line is down the group must be the same color of the back of the tab
What brush should we use for that black area ? I don't think that we should use the same color of the back of the current selected tab
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Ribbon tab color MICROSOFT OFFICE 2016
Also Itried it and also I saw the black line
perhaps can change ( for 2016) the type of Brush from blue to white
something as
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
//*FillRect( hDCMem, aRect, hBrush2 )
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, CLR_WHITE, CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
perhaps can change ( for 2016) the type of Brush from blue to white
something as
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
//*FillRect( hDCMem, aRect, hBrush2 )
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, CLR_WHITE, CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
I notice that the tab design also needs some work. The focused tab seems to have an extra line around the border--probably from the 2013 design. The Microsoft ribbonbar 2016 design is clean without this line.
Regards,
James
Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Are we using the same font ?
James, yes, there are differences there also
And the groups should be painted different, just one vertical gray line on the right side
James, yes, there are differences there also
And the groups should be painted different, just one vertical gray line on the right side
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Silvio, and what about the other Ribbon themes ? They will not look fine if we force white thereSilvio.Falconi wrote:Also Itried it and also I saw the black line
perhaps can change ( for 2016) the type of Brush from blue to white
something as
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
//*FillRect( hDCMem, aRect, hBrush2 )
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, CLR_WHITE, CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Ribbon tab color MICROSOFT OFFICE 2016
on test
on class
some test ( with metro colors)
Orange
green
teal
steel
just my cent
Code: Select all
oRBar:nClrPaneRB := MIN( ncolor1,ncolor2)
Code: Select all
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, ::nClrPaneRB,CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
Orange
green
teal
steel
just my cent
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Antonio,
Hmm, I guess that would be a problem since you are using the preprocessor to call the class. I don't know how you could call a different class based on a parameter. But I don't know anything about preprocessors. Maybe:
define ribbonbar2016 ...?
Regards,
James
Maybe it would be easier to subclass for the new ribbonbar?Silvio, and what about the other Ribbon themes? They will not look fine if we force white there
Hmm, I guess that would be a problem since you are using the preprocessor to call the class. I don't know how you could call a different class based on a parameter. But I don't know anything about preprocessors. Maybe:
define ribbonbar2016 ...?
Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Ribbon tab color MICROSOFT OFFICE 2016
Silvio,
Have you tried it with the original FWH ribbon theme ?
Every change we do has to be tested with previous themes, to asure that we keep backwards compatibility
Have you tried it with the original FWH ribbon theme ?
Every change we do has to be tested with previous themes, to asure that we keep backwards compatibility
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Ribbon tab color MICROSOFT OFFICE 2016
Exactly
we must use a logic new data l2016
and insert before my lines
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
IF ::l2016
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, ::nClrPaneRB,CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
Endif
or you have another suggestion
we must use a logic new data l2016
and insert before my lines
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
IF ::l2016
GradientFill( hDCMem, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, ::nClrPaneRB,CLR_WHITE } }, .T. )
aRect[ 3 ] -= 3
FillRect( hDCMem, aRect, hBrush2 )
aRect[ 3 ] += 3
Endif
or you have another suggestion
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC