Skip to content

UI redesign, EZUI, HIG, etc. #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ryanbugden opened this issue Apr 19, 2023 · 1 comment
Open

UI redesign, EZUI, HIG, etc. #8

ryanbugden opened this issue Apr 19, 2023 · 1 comment

Comments

@ryanbugden
Copy link
Contributor

ryanbugden commented Apr 19, 2023

Here's a sketch:
image

import ezui

class CornerTools(ezui.WindowController):

    def build(self):
        content = """
        * TwoColumnForm      @mainForm
        > : Treatment:
        > (X) Break          @treatmentRadios
        > ( ) Build
        > ( ) Pit
        > : Radius:
        > ---X--- [__]       @radiusSlider
        > : Roundness:
        > ---X--- [__]       @roundnessSlider
        ---
        """
        footer = """
        No corners selected. @statusLabel
        (Apply)              @applyButton
        """
        
        descriptionData = dict(
            mainForm=dict(
                titleColumnWidth=72,
                itemColumnWidth=200
            ),
            statusLabel=dict(
                gravity='leading',
            )
        )
        self.w = ezui.EZWindow(
            title='Corner Tools',
            content=content,
            descriptionData=descriptionData,
            footer=footer,
            controller=self
        )

    def started(self):
        self.w.open()

CornerTools()
@ryanbugden
Copy link
Contributor Author

Maybe tabs would be best.
image

import ezui

class CornerTools(ezui.WindowController):

    def build(self):
        content = """
        * Tabs
        
        > * Tab: Break
        >> * TwoColumnForm      @breakForm
        >>> : Radius:
        >>> ---X--- [__]        @radiusSlider
        >>> : Roundness:
        >>> ---X--- [__]        @roundnessSlider
        
        > * Tab: Build
        
        > * Tab: Pit
        >> * TwoColumnForm      @pitForm
        >>> : Depth:
        >>> ---X--- [__]        @depthSlider
        >>> : Breadth:
        >>> ---X--- [__]        @breadthSlider
        >>> : Bottom:
        >>> ---X--- [__]        @bottomSlider
        
        
        ---
        """
        footer = """
        No corners selected.    @statusLabel
        (Apply)                 @applyButton
        """
        
        title_column_width = 80
        item_column_width  = 200
        descriptionData = dict(
            breakForm=dict(
                titleColumnWidth=title_column_width,
                itemColumnWidth=item_column_width
            ),
            buildForm=dict(
                titleColumnWidth=title_column_width,
                itemColumnWidth=item_column_width
            ),
            pitForm=dict(
                titleColumnWidth=title_column_width,
                itemColumnWidth=item_column_width
            ),
            statusLabel=dict(
                gravity='leading',
            )
        )
        self.w = ezui.EZWindow(
            title='Corner Tools',
            content=content,
            descriptionData=descriptionData,
            size=(450, 'auto'),
            footer=footer,
            controller=self
        )

    def started(self):
        self.w.open()

CornerTools()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant