--- a/ViewWithAcceptAndCancelBar.st Wed Sep 22 08:17:33 2021 +0100
+++ b/ViewWithAcceptAndCancelBar.st Thu Oct 14 11:55:23 2021 +0200
@@ -1,5 +1,6 @@
"
COPYRIGHT (c) 2006 by eXept Software AG
+ COPYRIGHT (c) 2021 LabWare
All Rights Reserved
This software is furnished under a license and may be used
@@ -22,7 +23,8 @@
!
SimpleView subclass:#AcceptAndCancelBar
- instanceVariableNames:'acceptButton cancelButton compareButton'
+ instanceVariableNames:'acceptButton cancelButton compareButton acceptColor cancelColor
+ compareColor'
classVariableNames:''
poolDictionaries:''
privateIn:ViewWithAcceptAndCancelBar
@@ -40,6 +42,7 @@
copyright
"
COPYRIGHT (c) 2006 by eXept Software AG
+ COPYRIGHT (c) 2021 LabWare
All Rights Reserved
This software is furnished under a license and may be used
@@ -259,19 +262,34 @@
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar methodsFor:'initialization'!
+initStyle
+ "this method sets up all style dependent things"
+
+ <resource: #style (#'acceptAndCancelBar.acceptBackgroundColor'
+ #'acceptAndCancelBar.cancelBackgroundColor'
+ #'acceptAndCancelBar.compareBackgroundColor')>
+
+ super initStyle.
+
+ acceptColor := styleSheet colorAt: 'acceptAndCancelBar.acceptBackgroundColor'
+ default: [ UserPreferences current useColorsForColorBlindness
+ ifTrue:[ Color blue onDevice:device ]
+ ifFalse:[ Color green onDevice:device ] ].
+
+ cancelColor := styleSheet colorAt: 'acceptAndCancelBar.cancelBackgroundColor'
+ default: [ Color red onDevice:device ].
+
+ compareColor := styleSheet colorAt: 'acceptAndCancelBar.compareBackgroundColor'
+ default: [ Color yellow onDevice:device ].
+
+ "Created: / 14-10-2021 / 11:49:04 / Jan Vrany <jan.vrany@labware.com>"
+!
+
initialize
- |acceptColor cancelColor compareColor order|
+ | order|
super initialize.
- UserPreferences current useColorsForColorBlindness ifTrue:[
- acceptColor := Color blue.
- ] ifFalse:[
- acceptColor := Color green.
- ].
- cancelColor := Color red.
- compareColor := Color yellow.
-
order := UserPreferences current acceptCancelBarOrder.
acceptButton := ButtonWithHelpText new.
@@ -312,6 +330,7 @@
"
"Modified: / 26-09-2012 / 14:44:18 / cg"
+ "Modified: / 14-10-2021 / 11:49:58 / Jan Vrany <jan.vrany@labware.com>"
! !
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar::ButtonWithHelpText methodsFor:'accessing'!
@@ -338,5 +357,10 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !