profile
viewpoint

redox-os/orbtk 1843

The Rust UI-Toolkit.

FloVanGH/cargo-node 61

A cargo sub command to build, run and deploy rust wasm applications as browser, electron or cordova app.

redox-os/orbgame 19

Mirror of https://gitlab.redox-os.org/redox-os/orbgame

redox-os/orbtk-template 3

A template for starting an OrbTk project

FloVanGH/arewegameyet 0

The repository for arewegameyet.rs

FloVanGH/cargo-generate 0

cargo, make me a project

FloVanGH/cortex-m-quickstart 0

Template to develop bare metal applications for Cortex-M microcontrollers

FloVanGH/rust_minifb 0

Cross platfrom window and framebuffer crate for Rust

valkum/orbtk-chat 0

OrbTK wireframe implementation of https://dribbble.com/shots/5452318-Freebie-Chat-Desktop-App-macOS-PS-Sketch-Adobe-XD-Figma

push eventredox-os/orbtk

Florian Blasius

commit sha 77a9f149aea245fbc467c618ac083c863859bae8

Update README.md

view details

push time in 9 minutes

push eventredox-os/orbtk

Florian Blasius

commit sha 056f17139fdcf38abcdd2198a5594491fead045e

Start to add base concepts to Readme.

view details

Florian Blasius

commit sha cfe8b0ca2aacf5067c2fb223da70db9c17dda042

Update Readme.

view details

Florian Blasius

commit sha bb424bc0679fdf46a096e4a4afe908b9a1c33ae2

Readme update.

view details

Florian Blasius

commit sha 32b1632a883507e5f749fd79b5948ee80889a0ef

Merge pull request #177 from redox-os/readme Readme update

view details

push time in 13 hours

PR merged redox-os/orbtk

Readme update

Add base concepts to readme.

+81 -0

0 comment

1 changed file

FloVanGH

pr closed time in 13 hours

PR opened redox-os/orbtk

Readme update

Add base concepts to readme.

+81 -0

0 comment

1 changed file

pr created time in a day

create barnchredox-os/orbtk

branch : readme

created branch time in a day

startedAltSourceio/AltSource

started time in a day

issue commentredox-os/orbtk

How to create List

You could check the widgets example.

levirs565

comment created time in 2 days

issue commentredox-os/orbtk

Beginners documentation

@clouds56 in one run the update method of a state is called one time. If the state should handle multiple actions depends on the use case. If the state should handle only handle one action at time a single action is enough, otherwise e.g. a VecDeq<Action> could be used.

hanckmann

comment created time in 2 days

startedProvenance-Emu/Provenance

started time in 2 days

push eventredox-os/orbtk

Florian Blasius

commit sha c0bc377b0b8c780fd3211a480d63945e86eb0b67

fix.

view details

push time in 3 days

push eventredox-os/orbtk

Florian Blasius

commit sha 23e0d79022a2a5992bf32b51c6d45dd8d8a588cc

up.

view details

push time in 3 days

issue commentredox-os/orbtk

Can I catch the event when the window size changes?

Not at the moment. What you can do is check in your state if the size of the window is changed.

fn update(&mut self, _: Registry, ctx: Context) {
    let window_size = ctx.window().get::<Rectangle>("bounds").size();
}
nabezokodaikon

comment created time in 5 days

issue closedredox-os/orbtk

Struct orbtk::TextBlock doesn't appear to have "Word Wrapping"

Context

At the moment the Struct orbtk::TextBlock seems like it should really be called a Label, since it only seems to support one line of text.

Problem description & Solution

I don't have a solution. But my problem is that I wanted to render some text which I would use as a sort of Message Center for the user. I'm trying to do a simple game, and I would like to use something like TextBlock to give information to the Player. But this information would be more than one line, but I don't know it in advance. For example:

"Poker is a fascinating, easy-to-learn game that has surged in popularity since the turn of the millennium. While different variants and types of poker can be played, the basic poker rules usually stay consistent from one form to the next."

Examples and MockUps

.child( TextBlock::create() .text("Good afternoon Player 1, Poker is a fascinating, easy-to-learn game that has surged in popularity since the turn of the millennium. While different variants and types of poker can be played, the basic poker rules usually stay consistent from one form to the next. ") .width(370.0) .height(370.1) .wordwrap(true) .margin(4.0)

                        .build(ctx)
                )

closed time in 5 days

rdearman

issue closedredox-os/orbtk

Window::create() Cannot find declaration to go to

use orbtk::prelude::*; fn main() { Application::new() .window(|ctx| { Window::create() //How to find this declaration .title("OrbTk - minimal example") .position((100.0, 100.0)) .size(420.0, 730.0) .child(TextBlock::create().text("OrbTk").build(ctx)) .build(ctx)

    })
    .run();

}

closed time in 5 days

maxuanji

issue commentredox-os/orbtk

TextBox doesn't allow upper-case nor shift+digit (eg !, @, #, ...)

!, @, # should work now.

shadiakiki1986

comment created time in 5 days

push eventredox-os/orbtk

Florian Blasius

commit sha d06a6e763bcbd36e5cb0a7f17dbd14a2f195f220

Refactor text_box code.

view details

Florian Blasius

commit sha 4d9b769259af9c627fa008f5b9df47e93e2d96c0

Start refactor events and focus handling.

view details

Florian Blasius

commit sha 4592a85c9ebba5838363eeab3c3c278aa183b28f

Move focus handling to window widget.

view details

Florian Blasius

commit sha 5b436ccfe7b8d17dcf21326f000388416913bc95

Work on select all and remove all selected.

view details

Florian Blasius

commit sha eae5d7769e26fab665c78e91c9993ebe5f91349b

Try to fix modifier handling minifb.

view details

Florian Blasius

commit sha 7c5076a21c59134d8f09fb057f390caa9e0c9610

Refactor expand Ctrl a behavior.

view details

Florian Blasius

commit sha 251ce384bf56db5ee6090143ec77d2a72522bdba

wip split scroll layout and textbox.

view details

Florian Blasius

commit sha eaa4853f89be3c03052984c58ba068bd94026de3

Work on cursor move end fix.

view details

Florian Blasius

commit sha fda65ab8e86e6c0ac495f6b338eb7f0cdd5d406c

Move adjust cursor to text selection layout.

view details

Florian Blasius

commit sha 6f89b8a335c02f8ff1b1fed9cde16b2e2990a953

Finish text box improvement.

view details

Florian Blasius

commit sha 3d0b4b998fe71d24d9123ac4694cab99bc0c8280

Small fix.

view details

Florian Blasius

commit sha c8286a37234f386c660af3b8ccb25bca8aacb062

Fix all. And implement select all on focus request.

view details

Florian Blasius

commit sha f570c6bbac84f638d0bac83223dff1e5d7ca6240

Fix left right move on expanded cursor.

view details

Florian Blasius

commit sha 48570e19849e1b7be2aa1bc39e253b6a14a0ecd0

Merge pull request #164 from redox-os/text_box Text box improvements

view details

push time in 5 days

PR merged redox-os/orbtk

Text box improvements
  • Refactoring TextBox widget
  • Ctrl (Command) + A: Select all
  • #162
+651 -368

0 comment

31 changed files

FloVanGH

pr closed time in 5 days

push eventredox-os/orbtk

Florian Blasius

commit sha 251ce384bf56db5ee6090143ec77d2a72522bdba

wip split scroll layout and textbox.

view details

Florian Blasius

commit sha eaa4853f89be3c03052984c58ba068bd94026de3

Work on cursor move end fix.

view details

Florian Blasius

commit sha fda65ab8e86e6c0ac495f6b338eb7f0cdd5d406c

Move adjust cursor to text selection layout.

view details

Florian Blasius

commit sha 6f89b8a335c02f8ff1b1fed9cde16b2e2990a953

Finish text box improvement.

view details

Florian Blasius

commit sha 3d0b4b998fe71d24d9123ac4694cab99bc0c8280

Small fix.

view details

Florian Blasius

commit sha c8286a37234f386c660af3b8ccb25bca8aacb062

Fix all. And implement select all on focus request.

view details

Florian Blasius

commit sha f570c6bbac84f638d0bac83223dff1e5d7ca6240

Fix left right move on expanded cursor.

view details

push time in 5 days

push eventredox-os/orbtk

kivimango

commit sha 1ed83bb08ca0db8e0545b7ea8b1597005f8c7c69

Fixed typos in doc comments

view details

kivimango

commit sha e2ae4984ecfda63cad3231ca61bd4684395cbab1

Turned comment into doc comment

view details

kivimango

commit sha ff94d6848a89a193a87a6452d220402d61a73243

Fixed typo in doc comment

view details

kivimango

commit sha 194dbdf62a250f817fb35d0e1ae37beba90f4b9e

Fixed typos in doc comments in the api crate

view details

Florian Blasius

commit sha a8110360192371bcc6b4d027acd03795cbc48706

Merge pull request #175 from kivimango/develop Fixed typos in doc comments

view details

push time in 6 days

PR merged redox-os/orbtk

Fixed typos in doc comments

I fixed two typos in doc comments during reading the source code. Then i checked the crates::api, more to come

+31 -31

1 comment

14 changed files

kivimango

pr closed time in 6 days

pull request commentredox-os/orbtk

Fixed typos in doc comments

Thank you 🙂

kivimango

comment created time in 6 days

push eventredox-os/orbtk

David Young

commit sha c26bdc3654440c996fa98136c10d68981d79ccb7

Fix typo on EventQueueIterator

view details

Florian Blasius

commit sha b022211a7225f867a382b7bf437923e9f8eba7c7

Merge pull request #173 from sciguy16/eventqueueiterator-typo-fix Fix typo on EventQueueIterator

view details

push time in 7 days

startedgogcom/galaxy-integrations-python-api

started time in 8 days

startedrust-qt/ritual

started time in 10 days

startedMachine-Hum/realm.one

started time in 15 days

issue commentredox-os/orbtk

How can I specify the position of the widget?

Overlay is only intend to place / draw widgets over the main tree. The layout of the overlay is an absolute layout:

 fn layout(&self) -> Box<dyn Layout> {
    Box::new(AbsoluteLayout::new())
}

With position you should be careful because it could be manipulated internal and it is use in combination of x/y of the bounds property.

For your purpose this should be work:

Grid::create()
    .child(
        Button::create()
            .id("open")
            // use margin left / top to set the button position in the grid
            .margin((100.0, 400.0, 0.0, 0.0))
            .width(100.0)
            .height(200.0)
            .text("Open")
            .on_click(move |states, _| {
               states.get_mut::<MainViewState>(id).open_dialog();
               true
             })
             .build(ctx),
    )

But is to absolute position your button really what you need? I would recommend to use it rarely. At the moment the only use of absolute position in OrbTk is it to draw the popup of the combobox on the position of the combobox button, all other stuff I could archive with layouts mechanics (it is more flexible then absolute position).

nabezokodaikon

comment created time in 17 days

push eventredox-os/orbtk

Valkum

commit sha a1a0ba430ed8362be98d6bcb43b956a3daf5d09a

Fix stack layout to use the max height/width Fixes #168

view details

Florian Blasius

commit sha 589f9057cc04c880f02b0017e57e1da736a93fc6

Merge pull request #171 from valkum/stack_fix Fix stack layout to use the max height/width

view details

push time in 17 days

PR merged redox-os/orbtk

Fix stack layout to use the max height/width

Currently the StackLayout uses the height/width in cross-dimension from the last child. This PR changes that to use the max height/width in cross-dimension Fixes #168

+2 -2

1 comment

1 changed file

valkum

pr closed time in 17 days

issue closedredox-os/orbtk

StackLayout uses last child as fixed width/height instead of using the maximum

Describe the bug See valkum/orbtk-chat#1

To Reproduce Steps to reproduce the behavior:

  1. Add different sized childs to stack
  2. The stack has the height/width of the last child in the not growing dimension.

Expected behavior Maybe the biggest child height/width should be used

https://github.com/redox-os/orbtk/blob/abd8f786010584ba21d9f410d381685b14794dad/crates/api/src/layout/stack.rs#L302-L321

    match orientation {
        Orientation::Horizontal => {
            desired_size.0 += width;
-           desired_size.1 = height;
+           desired_size.1 = desired_size.1.max(height);
        }
        Orientation::Vertical => {
-           desired_size.0 = width;
+           desired_size.0 = desired_size.0.max(width);
            desired_size.1 += height;
        }

closed time in 17 days

valkum

pull request commentredox-os/orbtk

Fix stack layout to use the max height/width

Thank you 🙂

valkum

comment created time in 17 days

issue commentredox-os/orbtk

How can I specify the position of the widget?

text is of type String16

ctx.child("open").set("text", String16::from("hello"));

should fix it.

nabezokodaikon

comment created time in 17 days

startedPSI-Rockin/DobieStation

started time in 17 days

issue closedredox-os/orbtk

Frameless window support request

Context

I want to self define Window frame.

Problem description & Solution

I have no idea.

Examples and MockUps

Window::create() ...... .frame(false) .build(ctx);

closed time in 18 days

MiyamuraMiyako

issue commentredox-os/orbtk

Frameless window support request

MR is merged.

MiyamuraMiyako

comment created time in 18 days

push eventredox-os/orbtk

Valkum

commit sha c2f2f55b1847f05eefca9b80d3ffebac3905c778

Update window creation to set title = false when borderless == true

view details

Florian Blasius

commit sha b56a24de7304efd02407d1fd293b8571a76dd9a2

Merge pull request #169 from valkum/borderless Fix borderless on mac

view details

push time in 18 days

PR merged redox-os/orbtk

Fix borderless on mac

minifb needs title = false to achieve a true borderless window on macos.

This PR sets title = false if borderless == true

We could also expose the title flag or just check if the title is an empty string and then set title = !borderless && title.len() == 0

+1 -0

1 comment

1 changed file

valkum

pr closed time in 18 days

pull request commentredox-os/orbtk

Fix borderless on mac

Thank you!

valkum

comment created time in 18 days

issue commentredox-os/orbtk

Grid row auto height does not work as expected

Until it is fixed as workaround you could set fixed height instead of auto. If the height or width is fixed and know I would suggest to use fixed values instead of auto also in general, because it reduces the calculation in the layout.

But we have to the auto calculation, thank you for the report and the example 🙂.

janibonnevier

comment created time in 18 days

issue commentredox-os/orbtk

StackLayout uses last child as fixed width/height instead of using the maximum

Thank you. That correct the expected behavior is that the biggest height/width should be used. You could create a PR if you want to fix it otherwise I also could do it.

valkum

comment created time in 18 days

issue commentredox-os/orbtk

How can I specify the position of the widget?

The position will be calculated internal. There are two ways to overwrite / set the position. First you could set the position if you child is in a absolute layout e.g. the overlay has a absolute layout or you could overwrite the position in the upate_post_layout method of the State. Alternative you could set margin top and right to position you widget that would work e.g. in a parent Grid.

nabezokodaikon

comment created time in 18 days

issue commentemoon/rust_minifb

Borderless window macOS / Linux

@valkum Set borderless: trueand tille: false works. Thank you.

FloVanGH

comment created time in 18 days

push eventredox-os/orbtk

Florian Blasius

commit sha 7c5076a21c59134d8f09fb057f390caa9e0c9610

Refactor expand Ctrl a behavior.

view details

push time in 18 days

issue commentemoon/rust_minifb

Ctrl and Home / Command key does not work

Ctrl worked but Home/Command key not.

FloVanGH

comment created time in 18 days

startedburtonageo/cargo-bundle

started time in 18 days

issue commentvalkum/orbtk-chat

Basic Widget Layout

I have now access, thank you.

I think there is a bug in the calculation of the auto columns and rows. I will check it this week, after I finished my current PR on OrbTk.

valkum

comment created time in 19 days

issue commentredox-os/orbtk

Window::create() Cannot find declaration to go to

The create method of the widgets like window is generated by the widget! macro. Check https://github.com/redox-os/orbtk/blob/abd8f786010584ba21d9f410d381685b14794dad/crates/api/src/macros.rs#L325

maxuanji

comment created time in 19 days

issue commentredox-os/orbtk

TextBlock text() set Chinese characters not displayed

At the moment we uses the Roboto Font, but it does not provide for languages like Chinese. I will try the Noto font, that supports many languages.

litttley

comment created time in 19 days

issue openedredox-os/orbtk

ProgressBar

Context

The ProgessBar should be used to indicates a progress, e.g. the progress by loading a file, or a screen.

Problem description & Solution

The ProgressBar should be indicates the progress between a min-value and a max-value. The current progress should be set by a val property.

Examples and MockUps

ProgressBar::create().min(0.0).max(100.0).val(50.0).build(ctx)

image

created time in 22 days

create barnchredox-os/orbtk

branch : short_names

created branch time in 22 days

PR opened redox-os/orbtk

WIP: Text box improvements
  • Refactoring TextBox widget
  • Internal Clipboard (step two connect to OS clipbord)
  • Ctrl (Command) + A: Select all
  • Ctrl (Command) + C: Copy selected text
  • Ctrl (Command) + V: Paste text
  • Ctrl (Command) + X: Cut selected text
+502 -268

0 comment

26 changed files

pr created time in 22 days

issue commentvalkum/orbtk-chat

Basic Widget Layout

I've got an

image

valkum

comment created time in 22 days

create barnchredox-os/orbtk

branch : text_box

created branch time in 22 days

startedbosmoment/PineTime-apps

started time in 22 days

issue closedredox-os/orbtk

How to get TextBox state in main

I’m trying to write an app that does the following:

  1. Gets launched from a command line interface
  2. Shows a window with a textbox and button
  3. When the button is clicked it hides the window, prints the text from the box to stdout, hides the window & exits

One approach would be to print the value in the update when the button is clicked, but that won’t be very flexible for additional use cases I’ll have in the future. Also I don’t think the update function should have side effects like printing to stdout.

So I’m trying to figure out the way to get the “text” property out of the MainView’s state in the window create closure. What is the correct way to get the state outside the update function at the top level?

closed time in 23 days

joefiorini

issue closedredox-os/orbtk

Widget (selector) ID is too easy to accidentally erase

It should be easy and intuitive to repeatedly change the styling associated with a (ID-indexed) widget, but currently if you call

ctx.child(id).set("selector", selector);

it will wipe out the ID of the widget/selector. If you then try to set the selector a second time, you'll get an unwrap panic on child because the previous set call overwrote the entire selector, ID included. You need to manually store then reset the ID every time you update the selector, which is a hassle and counter-intuitive (I just wasted hours trying to figure out what was going on).

Now if the ID in question was only a CSS selector ID, then the current behavior might make sense. But since ID doubles as the standard way to access a widget, I think a change of behavior is warranted if possible.

Side note: it would be nice if that unwrap was an expect instead. A useful error would save the human context-switch of flipping to the documentation of child.

closed time in 23 days

merehap

issue closedredox-os/orbtk

How to use ToggleButton's `pressed` flag with `on_click`?

I'm looking at examples/widgets.rs#L200. What I'd like to do is get the ToggleButton's status (pressed or not) and take an action accordingly. Something along the lines of

...
.child(
ToggleButton::create()
  .text("ToggleButton")
  .on_click(move |states, _| -> bool{ 
    if pressed { // <<<<< Need help here
      state(id, states).action(...);
    } else {
      state(id, states).action(...);
    }
  })
  .margin((0.0, 8.0, 0.0, 0.0))
  .attach(Grid::column(0))
  .attach(Grid::row(3))
  .build(ctx),
)
...

How can the if pressed condition be implemented?

I tried to figure it out and can guess that it's something along the lines of src/switch.rs#L105: states.get_mut::<SwitchState>(id).toggle_selection();, but I couldn't figure it out yet.

Edit: added state(...).action(...) to example

closed time in 23 days

shadiakiki1986

issue commentredox-os/orbtk

Android support

@SolidTux OrbTk provides now an initial touch support on web, text input does not work at the moment.

FloVanGH

comment created time in 24 days

push eventredox-os/orbtk

Florian Blasius

commit sha abd8f786010584ba21d9f410d381685b14794dad

Update README.md

view details

push time in 24 days

push eventredox-os/orbtk

Florian Blasius

commit sha de8c1ce873cfcb5f480678a36a60258617db1216

Block mouse on touch.

view details

push time in 24 days

push eventredox-os/orbtk

Florian Blasius

commit sha a6e4c3f771306272f7fc6a1a1cc14a8b357d49f1

Initial web touch support.

view details

push time in 24 days

push eventredox-os/orbtk

Florian Blasius

commit sha 522766de4005770bb9e3657de5cd1e58827e6c5e

Small fix on window widget.

view details

push time in 24 days

startedservo/pathfinder

started time in 24 days

issue commentredox-os/orbtk

Android support

@SolidTux OrbTk does not support touch input at the moment. But I will soon work on it. Hopefully we have someone that could work on a native Android support this month.

FloVanGH

comment created time in 25 days

push eventredox-os/orbtk

Florian Blasius

commit sha 79b8b243fe0439c4248c2391208bd937eae22b9a

Fix theme update propagation. Fix remove widget. Fix state update propagation.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 2dfa6dd910bbd24d5f61d6ab099485ee4ca0e743

Add check also to siebling search.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha d5bc86167722860711bb4c82ec88f18bec9d5a75

Fix tree key check.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha ccf2aa2a12c3160458a4b72634e7968895c21750

Add key check to tree iterator.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha b4783ad85d4e0226d3b93f58cba9dba87f35f100

Add visibility check to event system.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 1d84ab351d58e30bc032b02799c29b6b68767a4f

Add enabled check to mouse check.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha e5a9513c488f0be0506fe5c2379d41f44a2908be

Update togglebutton layout.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 24ce02bbd1d3b7d9e4c56704f21f3109eeb0e308

Add mouse behavior to list view item.

view details

push time in a month

startedserhii-londar/open-source-mac-os-apps

started time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha ad25dfec82eed9bedc607e7710bd3132e4a9108d

Add changed event to list view.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha f069076f3e1c42415d27cf8836a333cd681e1c23

Add borderless flag to window.

view details

push time in a month

issue openedemoon/rust_minifb

Borderless window macOS

Set borderless to true on WindowOptions does not work on macOS.

created time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 7bb9b8ba046e00d136c152e926c553d87988d560

Fix selection behavior.

view details

Florian Blasius

commit sha 2bdd52e25de91ffe2cbf100cc0475b6fb6cf5e97

Merge pull request #161 from redox-os/theming_improvements Fix selection behavior.

view details

push time in a month

PR merged redox-os/orbtk

Fix selection behavior.
+13 -4

0 comment

1 changed file

FloVanGH

pr closed time in a month

PR opened redox-os/orbtk

Fix selection behavior.
+13 -4

0 comment

1 changed file

pr created time in a month

issue commentredox-os/orbtk

Help wanted with checkbox widget

Should be fixed now, it was an bug in the selection behavior of the CheckBox.

I've also updated the selector api:

You should change:

.selector(Selector::from("check-box").id("id-1"))

to

.id("id-1")

And column 43 should also be:

   ctx.child("id-1").set("selected", is_selected);
Fenex

comment created time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 7bb9b8ba046e00d136c152e926c553d87988d560

Fix selection behavior.

view details

push time in a month

issue commentredox-os/orbtk

Widget (selector) ID is too easy to accidentally erase

I've updated the api of the selector:

// from
Button::create().selector(Selector::from("button").class("primary").id("my_id"). ...

// to
Button::create().element("button").class("primary").id("my_id"). ..
merehap

comment created time in a month

issue closedredox-os/orbtk

Examples: 7-11% idle CPU Load

Describe the bug Running cargo run --example widgets --release produces a UI with an idle CPU load ranging from 7-11%.

It appears that State#update is called continuously even when no state changes have occurred. I'm not sure if these calls are necessary but wanted to bring this to your attention. Idle CPU loads are generally indicative of defects and are non-starters for projects intended for devices with limited resources.

To Reproduce Steps to reproduce the behavior:

  1. cargo run --example widgets --release
  2. View cpu loads on running processes

Expected behavior Near zero CPU load when window is backgrounded or widgets are not being interacted with.

Screenshots image

Desktop (please complete the following information): image

closed time in a month

justinwilaby

issue commentredox-os/orbtk

Examples: 7-11% idle CPU Load

I optimized the update rate of minifb, that should reduce the idle CPU load of OrbTk. At next I will implement polling.

justinwilaby

comment created time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha a47c6811f7f5fac4c4e20fff0568a1394a9cb644

Improve update rate of minifb.

view details

Florian Blasius

commit sha f47a68ee84aed5bfdc640e19d201d1e14679c9d7

Start on theme improvements.

view details

Florian Blasius

commit sha 2f2973e3fee1dacad12e2602bcd37288b06fa6a5

Refactor selector property.

view details

Florian Blasius

commit sha 90e58bca8127f761f1eafa867ff478a211a8812f

Last fixes and improvements.

view details

Florian Blasius

commit sha 18966c94e3176ba145ab8af620297bf579c1e9bc

Merge pull request #159 from redox-os/theming_improvements Theming improvements

view details

push time in a month

PR merged redox-os/orbtk

Theming improvements
  • Improve default theme
  • Refactor selector property
// from
Button::create().selector(Selector::from("button").class("primary") ...

// to
Button::create().element("button").class("primary")
+358 -280

0 comment

42 changed files

FloVanGH

pr closed time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 90e58bca8127f761f1eafa867ff478a211a8812f

Last fixes and improvements.

view details

push time in a month

startedRuddle/oxidator

started time in a month

issue commentredox-os/orbtk

Widget (selector) ID is too easy to accidentally erase

Related MR #159

merehap

comment created time in a month

PR opened redox-os/orbtk

Theming improvements
  • Improve default theme
  • Refactor selector property
// from
Button::create().selector(Selector::from("button").class("primary") ...

// to
Button::create().element("button").class("primary")
+324 -264

0 comment

41 changed files

pr created time in a month

create barnchredox-os/orbtk

branch : theming_improvements

created branch time in a month

startedpop-os/shell

started time in a month

issue commentredox-os/orbtk

Examples: 7-11% idle CPU Load

Related to #158

justinwilaby

comment created time in a month

issue commentredox-os/orbtk

Unnecessary wakeup

Thank you very much. Some architectural changes are needed in OrbTk to archive that. The wake up need to be called from window events and custom events that could come from a background thread. The next big topic would be better mechanisms to support async functions and custom threads https://gitlab.redox-os.org/redox-os/orbtk-mirror/issues/215. I will use this topic also to implement poll in OrbTk.

sfanxiang

comment created time in a month

issue closedredox-os/orbtk

font_size takes no effect when appending child via Context

Describe the bug As in title, no matter what font size I specify when creating new TextBlock, the outcoming font size does not vary.

To Reproduce

struct FooState {
    action: Option<FooAction>,
    messages_count: RefCell<usize>,
}

impl FooState {
    fn action(...) {...}

    fn push_msg(&self, ctx: &mut Context, message: String) {
        *self.messages_count.borrow_mut() += 1;
        let messages_stack = ctx.entity_of_child("messages")
            .expect("Failed to acquire entity of messages stack");

        let message_entity = TextBlock::create()
            .text(String16::from(message))
            .font_size(5.0)
            .selector(Selector::from("text-block")
                .id(format!("message_{}", *self.messages_count.borrow())))
            .horizontal_alignment("start")
            .vertical_alignment("start")
            .build(&mut ctx.build_context());

        ctx.append_child_entity_to(
            message_entity,
            messages_stack,
        )
    }
}

widget!(
    FooView<FooState> {
        started: bool
    }
);

impl Template for FooView {
    fn template(self, id: Entity, ctx: &mut BuildContext) -> Self {
        self.name("FooView")
            .child(
                Stack::create()
                    .orientation("vertical")
                    .selector(Selector::from("stack").id("messages"))
                    .build(ctx),
            )
            .build(ctx),
    }
}

Then call push_message from update function with different font_size. I've also tried with append_child_to without using build on message_entity and the effect is the same

Expected behavior I expected to be able to change font_size in appended widgets.

Desktop (please complete the following information):

  • OS: Windows 10 Home
  • no browser
  • Version: 1903
  • latest branch develop as for 18.01.2020

closed time in a month

Zwo1in

issue closedredox-os/orbtk

Attach function to window close

Hi, I've run into a situation where I'd like to have my State's update function called periodically rather than just when an event occurs, which I've implemented similarly to #132 with a background thread requesting a ShellRequest::Update every 30 Hz.

I'd like an easy way of cleaning up this thread once the user closes the window, but I'm not sure about how to do latch onto the SystemEvent::Quit event to be able to do this, do you have any ideas?

closed time in a month

duncanrhamill

issue commentredox-os/orbtk

Attach function to window close

done!

duncanrhamill

comment created time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha 6e3cdbf499f7af4da41c2c0f157b2ca0dba0a60d

Web fix.

view details

push time in a month

push eventredox-os/orbtk

Florian Blasius

commit sha b98c69a580bb83eee64b107de39d87532c38d7c3

Add cleanup method to states.

view details

push time in a month

issue closedredox-os/orbtk

example/widgets.rs: Executable size jump from 2MB to 17MB

I noticed that the executable size for cargo build --example widgets --release jumps

  • from ~2MB for 0.3.1-alpha1 with rustc 1.37
  • to ~17MB for 5cb3649 (latest commit 20 days ago) with rustc 1.41

Not sure if this means anything, but I thought I'd bring it up anyway just in case it's important.

closed time in a month

shadiakiki1986
more