Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Menus&Toolbars » Toolbar and gray color in layout
Re: Toolbar and gray color in layout [message #6272 is a reply to message #6183] Sun, 05 November 2006 11:27 Go to previous messageGo to previous message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Hello Luigi,

forlano wrote on Wed, 01 November 2006 20:45


Thank you very much! Now looks better.



add this to your code, too and it look even better - imho (I use it, too)
file: CtrlLib/ToolBar.cpp
void ToolButton::Paint(Draw& w) 
{
   painted_checked = checked;
   Size sz=GetSize();
   Size isz =image.GetSize();

//insert starts
   Ctrl *q=GetParent()->GetParent();
   if(!q||!q->IsTransparent())
//insert ends
      w.DrawRect(....);
   if(IsEnabled()) {
      bool push = HasMouse() && GetMouseLeft();
      if(IsXpStyle()) {
         [...]
         else
//insert starts
            if(!q||!q->IsTransparent())
//insert ends
               w.DrawRect(...);
         DrawHighlightImage(...);
      }
      else {
          //guess no need to change anything here - hope at least
      }
   }
   else
      w.DrawImage(...);
}


looks like this:
index.php?t=getfile&id=338&private=0
on the left the icons - the first enabled the others disabled, on the right the first with mouse over it, ready to be pressed Smile
Bas
  • Attachment: toolbar.jpg
    (Size: 3.57KB, Downloaded 4043 times)

[Updated on: Sun, 05 November 2006 11:34]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MenuBar does not show slahses
Next Topic: CtrlImg::new_doc()
Goto Forum:
  


Current Time: Sun Apr 28 16:11:19 CEST 2024

Total time taken to generate the page: 0.03698 seconds