From be42b282ffc1d12f920dc64560a36bf2f812848f Mon Sep 17 00:00:00 2001 From: Joana Bergsiek Date: Thu, 12 Oct 2023 16:42:32 +0200 Subject: [PATCH] Adds doubleclick on watch displays to explore all values --- .../SBInactiveExampleWatch.class.st | 2 +- .../SBWatchValueBlock.class.st | 4 ++-- .../Sandblocks-Watch/SBWatchView.class.st | 23 ++++++++++++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/Sandblocks-Babylonian/SBInactiveExampleWatch.class.st b/packages/Sandblocks-Babylonian/SBInactiveExampleWatch.class.st index bb93a7ed..1b7b0297 100644 --- a/packages/Sandblocks-Babylonian/SBInactiveExampleWatch.class.st +++ b/packages/Sandblocks-Babylonian/SBInactiveExampleWatch.class.st @@ -30,7 +30,7 @@ SBInactiveExampleWatch >> doubleClick: evt [ "Nothing" ] -{ #category : #'as yet unclassified' } +{ #category : #accessing } SBInactiveExampleWatch >> expression: aBlock [ super expression: aBlock. diff --git a/packages/Sandblocks-Babylonian/SBWatchValueBlock.class.st b/packages/Sandblocks-Babylonian/SBWatchValueBlock.class.st index 74c84009..fe955c43 100644 --- a/packages/Sandblocks-Babylonian/SBWatchValueBlock.class.st +++ b/packages/Sandblocks-Babylonian/SBWatchValueBlock.class.st @@ -16,7 +16,7 @@ SBWatchValueBlock class >> registerShortcuts: aProvider [ ] -{ #category : #'as yet unclassified' } +{ #category : #'event handling' } SBWatchValueBlock >> doubleClick: evt [ super doubleClick: evt. @@ -25,7 +25,7 @@ SBWatchValueBlock >> doubleClick: evt [ { #category : #accessing } SBWatchValueBlock >> exploreValue [ - + self watchValue watchedValue explore ] diff --git a/packages/Sandblocks-Watch/SBWatchView.class.st b/packages/Sandblocks-Watch/SBWatchView.class.st index 506853c2..8fa78dac 100644 --- a/packages/Sandblocks-Watch/SBWatchView.class.st +++ b/packages/Sandblocks-Watch/SBWatchView.class.st @@ -125,12 +125,26 @@ SBWatchView >> displayWatchValues [ ifFalse: [self maxWidth]). ] +{ #category : #'event handling' } +SBWatchView >> doubleClick: evt [ + + super doubleClick: evt. + self exploreValues +] + { #category : #'colors and color policies' } SBWatchView >> drawnColor [ ^ Color white ] +{ #category : #accessing } +SBWatchView >> exploreValues [ + + + self object explore +] + { #category : #accessing } SBWatchView >> incrementCount [ @@ -183,7 +197,7 @@ SBWatchView >> layoutCommands [ { #category : #accessing } SBWatchView >> maxWidth [ - ^ 450 + ^ 300 ] { #category : #accessing } @@ -202,7 +216,9 @@ SBWatchView >> object [ { #category : #'event handling' } SBWatchView >> placeholder [ - ^ Morph new color: Color transparent; extent: (0@0) + ^ Morph new + color: Color transparent; + extent: (0@0) ] { #category : #printing } @@ -330,5 +346,6 @@ SBWatchView >> watchValuesContainer [ changeTableLayout; listDirection: #leftToRight; layoutInset: 1; - borderWidth: 0 + borderWidth: 0; + on: #doubleClick send: #exploreValues to: self ]