15 questions
1
vote
0
answers
80
views
iced_winit fails to compile to android?
I've been trying to build a simple android app through the rust and the iced-rs crate. After some research, I found the xbuild tool, which seemed to fit what I was looking for. After bringing my code ...
1
vote
1
answer
128
views
Resize text_editor to window or window to text_editor in Iced
I'm creating a small GUI application using Iced. I have managed to add the widgets I want, but now I want them to fill the window.
I want the text_editor (gray box) to fill up the available horizontal ...
0
votes
1
answer
113
views
Store iced Element of Text in my Apps struct
I have a function which matches against an enum with Strings and makes text elements with a color corresponding to the enum. I want to store those Texts in a field of MyApp.
(Edit)
The previous ...
0
votes
0
answers
283
views
How to create draggable widgets in iced-0.13.x
I use iced_0.13.1 to build up my app and want to realize a draggable item.
A minimal(ish) reproduceable example:
use iced::{
advanced::{image, mouse},
widget::{
canvas::{self, Geometry,...
0
votes
1
answer
103
views
cannot send to a stream when listening o another one in rust
I'm currently playing around with iced, a gui framework for rust. The following code is the function for a Subscription.
use iced::futures::{SinkExt, Stream};
use iced::time::Duration;
use iced::...
1
vote
0
answers
248
views
How to focus text_editor in rust Iced
I am working with tabular data and I want to be able to edit individual cells by clicking on them using the editor widget that is fixed to the top of the cells in my UI (like excel or google ...
0
votes
1
answer
443
views
How Can I Efficiently Render an Emulator Framebuffer in an Iced Widget at 60 FPS?
I’m working on an NES emulator in Rust using Iced for the UI. In my previous implementation, I used SDL2 and streamed the framebuffer into an SDL2 texture, which was then rendered at 60 FPS.
Now I ...
1
vote
2
answers
1k
views
How to Style Button in Iced 0.12?
I'm new to Rust language and I want to style my button so it can be disabled when the process is still running.
I use iced 0.12.1.
This is my code snippet:
#[derive(Debug, Clone, Copy)]
pub struct ...
2
votes
1
answer
801
views
How can I have a widget::Overlay contain multiple elements in iced?
So I am trying to build a widget that I can right-click, and it opens a little menu with some buttons to click. I've been following similar examples and concepts in the iced_aw repo, and I have ...
1
vote
2
answers
446
views
Iced Rust button DefaultStyle compiling error
I'm trying to do the iced rust tutorial (from the book) but i encountered a compiling error hen i tried to make a button:
use iced::widget::button;
fn main() {
let mut counter = Counter { value: 0 }...
0
votes
1
answer
1k
views
How to create a table of custom shapes in iced (Rust GUI framework)?
I'm trying to create a GUI for a board game engine. To that end I'm trying to transform the State (A struct with a grid where game pieces can be) into a rendered grid.
I decided to try and do this ...
0
votes
1
answer
344
views
Returning a custom exit code from Iced application
I have a UI application written in iced, which performs various operation. To launch the UI I'm using run() method: UpdateDriver::run(Settings::default()) and currently this returns the exit code of ...
3
votes
2
answers
1k
views
Loading fonts at runtime in Rust
I'm working on a Rust desktop application that utilizes the Iced GUI. I use to load a custom font to use for Iced widgets:
// fonts module:
use iced::Font;
pub const NOTO_SANS_REGULAR: Font = Font::...
2
votes
1
answer
674
views
How can I send a "Message" back to a "Higher" Struct?
I currently have 2 files: Main.rs and Connection.rs.
Connection.rs currently contains the ability to Send, Listen and Connect to a TcpStream.
Connection.rs
use tokio::io::{AsyncReadExt, AsyncWriteExt, ...
0
votes
0
answers
489
views
Rust Derive Clone For a Specific Struct
Note: I am using iced for the GUI TextInput and tokio for the networking TcpStream
I have the following:
#[derive(Debug, Clone)]
enum Message {
Session(Result<Connection, ConnectionError>), /...