Ribbon tab color MICROSOFT OFFICE 2016

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

Silvio,
Silvio.Falconi wrote:Please try this style

Code: 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
very nice :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Enrico Maria Giordano »

Probably you added one or more items to the folder without adjusting aClrTabTxt accordingly.

EMG
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

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 use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

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 use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

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




Image
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
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

Post by James Bott »

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.

Image

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

Silvio.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




Image
Silvio, and what about the other Ribbon themes ? They will not look fine if we force white there
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

on test

Code: Select all

oRBar:nClrPaneRB := MIN( ncolor1,ncolor2)
on class

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
some test ( with metro colors)

Orange

Image

green
Image

teal
Image
steel
Image


just my cent
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
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

Post by James Bott »

Antonio,
Silvio, and what about the other Ribbon themes? They will not look fine if we force white there
Maybe it would be easier to subclass for the new ribbonbar?

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply