Skip to content

Commit 738f09f

Browse files
authored
Add mkdir button (#134)
1 parent 394bcc9 commit 738f09f

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/basic_editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use iced::advanced::text::highlighter::Format;
1212
use iced::advanced::text::Highlighter as HighlighterTrait;
1313
use iced::widget::{
1414
button, column, container, row, rule, scrollable, text,
15-
text_editor::{self, Action, Content},
15+
text_editor::{Action, Content},
1616
tooltip, Space,
1717
};
1818
use iced::{Color, Element, Font, Length, Task};

src/file_browser.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,15 @@ impl FileBrowser {
10061006
tooltip::Position::Bottom,
10071007
)
10081008
.style(crate::styles::subtle_tooltip),
1009+
tooltip(
1010+
button(text("📁+ New").size(fs.small))
1011+
.on_press(FileBrowserMessage::ShowCreateDir)
1012+
.padding([2, 6])
1013+
.style(crate::styles::nav_button),
1014+
"Create a new folder in the current directory",
1015+
tooltip::Position::Bottom,
1016+
)
1017+
.style(crate::styles::subtle_tooltip),
10091018
]
10101019
.spacing(3)
10111020
.align_y(iced::Alignment::Center)

src/remote_browser.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,15 @@ impl RemoteBrowser {
11101110
)
11111111
.style(crate::styles::subtle_tooltip),
11121112
text(display_path).size(small).width(Length::Fill),
1113+
tooltip(
1114+
button(text("📁+").size(small))
1115+
.on_press(RemoteBrowserMessage::ShowCreateDir)
1116+
.padding([2, 6])
1117+
.style(crate::styles::nav_button),
1118+
"Create a new folder on the device",
1119+
tooltip::Position::Bottom,
1120+
)
1121+
.style(crate::styles::subtle_tooltip),
11131122
tooltip(
11141123
button(text("⟳").size(small))
11151124
.on_press(RemoteBrowserMessage::RefreshFiles)

0 commit comments

Comments
 (0)