mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 22:49:30 +01:00 
			
		
		
		
	Cocoa: TSpeedButton: set the highlighted background color when pressed, consistent with win32
before, TSpeedButton had a white highlighted background color when it was normal, and a gray background when it was pressed, causing confusion to users.
This commit is contained in:
		
							parent
							
								
									eb65e0684e
								
							
						
					
					
						commit
						feae93368d
					
				| @ -898,6 +898,8 @@ begin | ||||
|         BtnType := NSPushOnPushOffButton; | ||||
|         BezelStyle := BezelButton; | ||||
|         useBezel := true; | ||||
|         if IsPushed(Details) then | ||||
|           btn.setBackgroundColor(NSColor.selectedTextBackgroundColor); | ||||
|       end; | ||||
|     else | ||||
|       Result := false; | ||||
| @ -922,6 +924,7 @@ begin | ||||
|   btn.setHighlighted( IsPushed(Details)); | ||||
| 
 | ||||
|   if ((Details.Element = teToolBar) and (not IsPushed(Details)) and (not IsChecked(Details))) | ||||
|     or ((Details.Element = teButton) and (Details.Part = BP_PUSHBUTTON) and IsPushed(Details)) | ||||
|     or ((Details.Element = teButton) and (Details.Part = BP_CHECKBOX)) | ||||
|   then | ||||
|     // this is "flat" mode. So unpushed state should draw no borders | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 rich2014
						rich2014