Skip to content

Commit db9a723

Browse files
author
sspangenberg
authored
Moved logout button
Moved logout button to the top right corner
1 parent 05c72a9 commit db9a723

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
accessing
2+
addLogoutButtonTo: aMorph withSpacing: aSpacing
3+
4+
| logoutButton |
5+
6+
logoutButton := TCUButton new
7+
text: 'logout';
8+
on: #mouseUp send: #logout to: self.
9+
logoutButton position: (aMorph position x + aMorph width - logoutButton width - aSpacing) @ aSpacing.
10+
11+
aMorph addMorph: logoutButton.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
initialization
22
addHeader
33

4-
| header logoutButton |
5-
6-
header := self createHeaderMorph.
7-
8-
logoutButton := TCUButton new
9-
text: 'logout';
10-
on:#mouseUp send: #logout to: self;
11-
position: header position + 5.
12-
13-
self
4+
| header |
5+
6+
header := RectangleMorph new
7+
borderWidth: 0;
8+
color: TCUDefaultValues colorGray;
9+
extent: self width @ self defaultHeaderHeight.
10+
11+
self
1412
addMorph: header;
1513
addTitle: 'Telegram' to: header;
16-
addMorph: logoutButton.
14+
addLogoutButtonTo: header withSpacing: 5
15+
16+

0 commit comments

Comments
 (0)