Skip to content

Commit 9656884

Browse files
committed
[IMP] Feed buttons reorganized
1 parent 6e5de9c commit 9656884

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

src/lugus/lugus.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from textual.widgets import Header, Footer, ListItem, ListView, Rule, Select, Tree, Markdown, Static, Button, \
1313
Label, Input, Pretty, Switch
1414
from textual.reactive import reactive
15+
from rich.emoji import Emoji
1516

1617

1718
CONFIG_DIR = Path.joinpath(Path.home(), ".config/lugus")
@@ -245,15 +246,20 @@ def compose(self) -> ComposeResult:
245246
},
246247
)
247248
yield tree
248-
yield Button(
249-
"Sync",
250-
variant="primary",
251-
id="sync",
252-
)
253-
yield Button(
254-
"Add New Feed",
255-
variant="primary",
256-
id="add_new",
249+
yield Horizontal(
250+
Button(
251+
Emoji.replace(":counterclockwise_arrows_button:"),
252+
variant="primary",
253+
id="sync",
254+
tooltip="Get new articles from feeds",
255+
),
256+
Button(
257+
Emoji.replace(":heavy_plus_sign:"),
258+
variant="primary",
259+
id="add_new",
260+
tooltip="Add a new feed",
261+
),
262+
id="feed_buttons",
257263
)
258264

259265

@@ -423,7 +429,7 @@ def _synchronize_feeds(self, update_interface_element=None):
423429
)
424430
if update_interface_element:
425431
update_interface_element.disabled = False
426-
update_interface_element.label = "Sync"
432+
update_interface_element.label = Emoji.replace(":counterclockwise_arrows_button:")
427433
self.notify("Feeds synchronized!")
428434
return
429435

src/lugus/style.tcss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,24 @@ Screen {
4545

4646
#feedsbar {
4747
width: 100%;
48-
height: 90%;
48+
height: 95%;
4949
}
5050

51-
#sync {
51+
#feed_buttons {
5252
width: 100%;
5353
height: 5%;
5454
}
5555

56+
#sync {
57+
width: auto;
58+
height: auto;
59+
margin-right: 1;
60+
}
61+
5662
#add_new {
57-
width: 100%;
58-
height: 5%;
63+
width: auto;
64+
height: auto;
65+
margin-right: 1;
5966
}
6067

6168
#articles_area {

0 commit comments

Comments
 (0)