Skip to content

Commit ad595f6

Browse files
committed
Improve the news component
Change how the GUI computes its height to so that it can handle the extra menu bar height easily
1 parent edc1ae4 commit ad595f6

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/components/gui/gui.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
.page-wrapper {
66
height: 100%;
7+
display: flex;
8+
flex-direction: column;
79
}
810

911
.body-wrapper {
10-
height: calc(100% - $menu-bar-height);
12+
flex-grow: 1;
1113
background-color: $ui-primary;
1214
}
1315

src/components/menu-bar/tw-news.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
@import "../../css/colors.css";
22

33
.news {
4-
background: $pen-primary;
4+
background: $motion-tertiary;
55
display: flex;
66
flex-direction: row;
77
align-items: center;
88
justify-content: space-between;
99
padding: 0.375rem 0;
10+
gap: 0.5rem;
1011
}
1112

1213
.text {
@@ -20,5 +21,6 @@
2021
}
2122

2223
.close {
24+
flex-shrink: 0;
2325
margin-right: 0.5rem;
2426
}

src/components/menu-bar/tw-news.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class TWNews extends React.Component {
3636
this.setState({
3737
closed: true
3838
});
39+
window.dispatchEvent(new Event('resize'));
3940
}
4041
render () {
4142
if (this.state.closed || isScratchDesktop()) {

0 commit comments

Comments
 (0)