Ribbon tab color MICROSOFT OFFICE 2016

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Sun May 07, 2017 8:54 am

regards, saludos

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

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Sun May 07, 2017 8:56 am

Silvio,

Silvio.Falconi wrote:Please try this style
Code: Select all  Expand view
#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: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Sun May 07, 2017 9:03 am

Image
regards, saludos

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

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Enrico Maria Giordano » Sun May 07, 2017 9:36 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Silvio.Falconi » Sun May 07, 2017 9:41 am

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Silvio.Falconi » Sun May 07, 2017 3:27 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Mon May 08, 2017 10:28 am

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

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Silvio.Falconi » Mon May 08, 2017 2:54 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby James Bott » Mon May 08, 2017 3:57 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Mon May 08, 2017 4:11 pm

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: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Mon May 08, 2017 4:13 pm

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

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Silvio.Falconi » Mon May 08, 2017 7:32 pm

on test
Code: Select all  Expand view
oRBar:nClrPaneRB := MIN( ncolor1,ncolor2)


on class
Code: Select all  Expand view
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby James Bott » Mon May 08, 2017 10:18 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Antonio Linares » Tue May 09, 2017 5:48 am

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

Re: Ribbon tab color MICROSOFT OFFICE 2016

Postby Silvio.Falconi » Tue May 09, 2017 10:34 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 56 guests