<commit_before>Class {
	#name : #GtMonitoredUniversesElement,
	#superclass : #BrHorizontalFlow,
	#category : #'GToolkit-Monitor'
}

{ #category : #initialization }
GtMonitoredUniversesElement >> createUniverseCard: aUniverse [
	| aContainer |
	
	aContainer := BrVerticalPane new
		background: Color white;
		margin: (BlInsets all: 7);
		padding: (BlInsets all: 1);
		addLook: (BrShadowLook new);
		exact: 150@100.

	aContainer viewModel addState: BrHoverModel new.
	aContainer addLook: (BrInteractiveCommonLook new
		default: [ :w | w border: (BlBorder paint: Color veryVeryLightGray width: 1) ];
		hovered: [ :w | w border: (BlBorder paint: BrGlamorousColors hoveredButtonBorderColor width: 1) ]).

	aContainer when: BlClickEvent do: [ :anEvent |
		anEvent consumed: true.
		anEvent currentTarget phlow spawnObject: aUniverse ].

	aContainer addChild: (self createUniverseName: aUniverse).
	aContainer addChild: (self createUniverseRunning: aUniverse).
	aContainer addChild: (self createUniverseSpaces: aUniverse).

	^ aContainer
]

{ #category : #initialization }
GtMonitoredUniversesElement >> createUniverseName: aUniverse [
	| aNameLabel |

	aNameLabel := BrLabel new
		padding: (BlInsets all: 4);
		look: BrGlamorousLabelLook;
		text: aUniverse hostClass label;
		asScalableElement.
	
	aNameLabel fitWidth.<commit_msg>Fix look error in GtMonitoredUniversesElement [feenkcom/gtoolkit#935]<commit_after>Class {
	#name : #GtMonitoredUniversesElement,
	#superclass : #BrHorizontalFlow,
	#category : #'GToolkit-Monitor'
}

{ #category : #initialization }
GtMonitoredUniversesElement >> createUniverseCard: aUniverse [
	| aContainer |
	
	aContainer := BlElement new
		layout: BlLinearLayout vertical.
	aContainer viewModel: (BrInteractiveModel new addState: (BrHoverModel new)).
	aContainer addLook: (BrInteractiveCommonLook new
		default: [ :w | w border: (BlBorder paint: Color veryVeryLightGray width: 1) ];
		hovered: [ :w | w border: (BlBorder paint: BrGlamorousColors hoveredButtonBorderColor width: 1) ]).
	
	aContainer
		constraintsDo: [ :c |
			c horizontal exact: 150.
			c vertical exact: 100 ];
		background: Color white;
		margin: (BlInsets all: 7);
		padding: (BlInsets all: 1);
		addLook: (BrShadowLook new).

	aContainer when: BlClickEvent do: [ :anEvent |
		anEvent consumed: true.
		anEvent currentTarget phlow spawnObject: aUniverse ].

	aContainer addChild: (self createUniverseName: aUniverse).
	aContainer addChild: (self createUniverseRunning: aUniverse).
	aContainer addChild: (self createUniverseSpaces: aUniverse).

	^ aContainer
]

{ #category : #initialization }
GtMonitoredUniversesElement >> createUniverseName: aUniverse [
	| aNameLabel |

	aNameLabel := BrLabel new
		padding: (BlInsets all: 4);
		look: BrGlamorousLabelLook;
		text: aUniverse hostClass label;
		asScalableElement.
	
	aNameLabel fitWidth.
{'fraction_non_alphanumeric': 0.09693338033133592, 'fraction_numerical': 0.008812125484666901, 'mean_word_length': 5.334821428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6611504', 'n_tokens_mistral': 994, 'n_tokens_neox': 912, 'n_words': 242}