It is currently Fri Nov 15, 2019 1:47 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Done] [All PB vers, gtk2/gtk3] colored parts issue
PostPosted: Sat Oct 28, 2017 5:46 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Jun 26, 2014 9:17 am
Posts: 308
Location: Germany
As with the CalendarGadget() i haven't seen no distribution or theme where setting colors for the calendar parts of the DateGadget() with SetGadgetColor(#Gadget, ColorType, Color) would really recolor something.
Since it is hardly possible to make the function work reliably under all Linux, a remark in the help would be good, like "Works only if supported". See also the Help ("not supported on Windows Vista+").
Code:
#Win_Main = 0

#DtG     = 0

Global.i gEvent, gQuit

Procedure Create_WinMain()
   If OpenWindow(#Win_Main, 300, 200, 400, 300, "DateGadget colored parts", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
      DateGadget    (#DtG,     5,   5, 200,  26, "%yyyy-%mm-%dd %hh:%mm:%ss", Date(2010, 06, 01, 12, 00, 00), #PB_Date_CheckBox)
      
      SetGadgetColor (#DtG, #PB_Gadget_BackColor,       $C0FFFF)
      SetGadgetColor (#DtG, #PB_Gadget_TitleBackColor,  $FFFFC0)
      SetGadgetColor (#DtG, #PB_Gadget_FrontColor,      $FF0000)
      SetGadgetColor (#DtG, #PB_Gadget_TitleFrontColor, $00FF00)
      SetGadgetColor (#DtG, #PB_Gadget_GrayTextColor,   $0000FF)
      
   EndIf
EndProcedure

Create_WinMain()

Repeat
   gEvent= WaitWindowEvent()
   
   Select gEvent
      Case #PB_Event_CloseWindow
         gQuit= #True
         
   EndSelect
   
Until gQuit
Regards, Charly

_________________
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de


Top
 Profile  
Reply with quote  
 Post subject: Re: [All PB vers, gtk2/gtk3] DateGadget: colored parts issue
PostPosted: Sat Oct 28, 2017 3:12 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5783
Location: Germany
These options are not implemented for Gtk. The docs need to be updated.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: [All PB vers, gtk2/gtk3] DateGadget: colored parts issue
PostPosted: Sun Oct 29, 2017 7:49 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Jun 26, 2014 9:17 am
Posts: 308
Location: Germany
Since the color issue concerns a lot of gadgets under Linux, it might be helpful to add a note in the help-file for
SetGadgetColor(#Gadget, ColorType, Color) (or GetGadgetColor(), SetGadgetItemColor(), GetGadgetItemColor() too)
for Linux newbies like:
"Works if supported by distribution, window manager and theme"!

It could prevent a lot of fruitless bug reports from newcomers.

_________________
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de


Top
 Profile  
Reply with quote  
 Post subject: Re: [All PB vers, gtk2/gtk3] DateGadget: colored parts issue
PostPosted: Tue Feb 06, 2018 11:07 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1704
Location: Germany (Saxony, Deutscheinsiedel)
I just added a Linux-specific note at SetGadgetColor() and SetGadgetItemColor() like suggested by Oma. Thanks!

@Fred/freak: if that is enough, this topic can be closed as 'Done' :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [All PB vers, gtk2/gtk3] DateGadget: colored parts issue
PostPosted: Tue Dec 11, 2018 6:23 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 24, 2012 10:19 am
Posts: 115
Some words has been added about gtk as Freak noticed it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye