Giter Site home page Giter Site logo

legui's Introduction

SpinyOwl

Hello👋! I'm Aliaksandr (or shortly Alex), currently living in Kraków, Poland 🏠. I'm a software developer 🤟 and working mainly in Java ☕.

In my free time, during the night 🌃, I'm working on an open-source GUI framework in Java language called legui and its successor

ko-fi

Top projects


SpinyOwl's Legui
SpinyOwl's SpinyGui

Stats


SpinyOwl's GitHub stats
Top Langs

legui's People

Contributors

adhtri001 avatar anoshkaalexandr avatar bdoryan avatar cout970 avatar dependabot[bot] avatar fglass avatar gemoschen avatar httpdigest avatar spinyowl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

legui's Issues

Component.addAll adds the components twice

I was debuging my app and I found that some listeners were called more then once per update, after a bit more debuging I found that some components were duplicated, I end up discovering that Component.addAll was adding the components twice.

What happens is that addAll() calls changeParent() for every component before adding it to the container.
The function changeParent() ends with a call to setParent() and this adds the component to the container.

Implement layouts

Implement different layouts, which allow:

  • create automatically resizable components.
  • create components pinned to one of edges of parent component.
    • - Implement layout interface
    • - Implement layouts
      • - Border pane
      • - Horizontal box
      • - Vertical box
      • - Stack box
      • - Grid pane

Huge performace impact in function TextState.getText()

I was having 7 fps and trying to find what was causing it, tried a profiler, and I get this:
http://prntscr.com/geyqui

I try to confirm this, and disabling legui rendering make the program run at 60+ fps

I'm not sure why this is happening because the method only calls StringBuffer.toString() and StringBuffer has an internal cache, maybe has something to do with the method being synchronized.

Performance

The function NvgRenderer.render(Frame frame, Context context) takes a lot of cpu time, as you can see in my application it takes even more time to run that function than render all the scene:

https://prnt.sc/h664n9

Right now I get around 25-30 fps, but removing that function call I get more than 60 fps.
I'm investigating what causes that lag.
You can find the lastest version of the application at the github repo

Add FlexBox Layout

FlexBox is one of the CSS 3 layouts made by W3C: https://www.w3schools.com/css/css3_flexbox.asp in the link you can find examples and documentation of the layout.

It allows to arrange elements in columns and rows, allowing to specify the vertical and horizontal orientation of the elements (start, center, end) and adapting to the avaliable space making it easier to create responsive user interfaces.

Implement CSS

Implement CSS with properties:


- border: <width> <style> <color>
- border-color: <color>
- border-width: <width>
- border-style: <style> // only solid for beggining is fine
- border-radius: <radius>
- background-color: <color>
- font-family: <family>
- opacity: <0-1>
- margin: <margin>
- width: <width>
- height: <height>
- min-width: <width>
- max-width: <width>
- min-height: <height>
- max-height: <height>

Implement marshallers

Implement marshallers for :

  • LayerContainer
  • Layer
  • ComponentLayer (Can be not implemented)
  • TooltipLayer (Can be not implemented)
  • Frame
  • ToggleButton
  • Tooltip

Implement layers

Need to implement layers.

Layer - is structure which will allow to create overlays, modal windows, tooltips, etc.

ToggleButton doesn't render text

I tried creating a ToggleButton with some text, because one the constructors accepts only a String, but it only renders the background color and the background icon, I checked NvgToggleButtonRenderer and doesn't seem to have any code to render text.

Default demos run downscaled on retina mac

This is what the default demos look like when running on my retina Macbook.
image

First thing I tried was to mess around with the viewport. I found that replacing the viewport dimensions from the window size to the framebuffer size works perfectly:

//Vector2i windowSize = context.getWindowSize();
Vector2f windowSize = context.getFramebufferSize();
glViewport(0, 0, (int)windowSize.x, (int)windowSize.y);

image

I haven't had any time to test if it still works on a non-retina screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.