picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

GTK NumericStepper not respecting Width. #1090

Open se5a opened 6 years ago

se5a commented 6 years ago

Expected Behavior

NeumericUpDown should respect width when app is running.

Actual Behavior

looks ok in the designer, but NeumericUpDown streaches out (infinatly?) when the app is run.

Steps to Reproduce the Problem

  1. Create brand new eto.forms project.
  2. Create a neumericUpDown between two labels in a tablerow, optional add width reference.
  3. Run the app.

Code that Demonstrates the Problem

?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Eto Form" ClientSize="400, 350" Padding="10">

    <!-- Replace Stacklayout with this tablelayout -->
    <TableLayout Padding ="5,5,5,5" >
        <TableRow>
            <Label>Some Content</Label><NumericUpDown Width="80"/><Label>Some Content</Label>
        </TableRow>
        <TableRow>
            <Label>Some Content</Label><NumericUpDown Width="80"/><Label>Some Content</Label>
        </TableRow>
    </TableLayout>

    <Form.Menu>
        <MenuBar>
            <ButtonMenuItem Text="F&amp;ile">
                <ButtonMenuItem Text="Click Me!" Click="HandleClickMe" />
            </ButtonMenuItem>
            <MenuBar.ApplicationItems>
                <ButtonMenuItem Text="Preferences.." Shortcut="{On Control+O, Mac=Application+Comma}" />
            </MenuBar.ApplicationItems>
            <MenuBar.QuitItem>
                <ButtonMenuItem Text="Quit" Shortcut="CommonModifier+Q" Click="HandleQuit" />
            </MenuBar.QuitItem>
            <MenuBar.AboutItem>
                <ButtonMenuItem Text="About..." Click="HandleAbout" />
            </MenuBar.AboutItem>
        </MenuBar>
    </Form.Menu>
    <Form.ToolBar>
        <ToolBar>
            <ButtonToolItem Text="Click Me!" Click="HandleClickMe" />
        </ToolBar>
    </Form.ToolBar>
</Form>

Specifications

se5a commented 6 years ago

Just to be sure it wasn't the table layout I tested StackLayout with horizontal orentation too:

    <StackLayout Orientation="Horizontal">
        <Label>Some Content</Label><NumericUpDown Width="80"/><Label>Some Content</Label>
    </StackLayout>

same result, the NeumericUpDown stretches out and you can't see the second label.

This did not appear to be a problem in earlier versions of Eto.

se5a commented 6 years ago

I should maybe mention that the right hand side of the control itself is also hidden, the stepper buttons are off the side of the viewable area:
numupdnpic

I found a version of my project which used a dev version of eto: 2.4.0-build1020 (approximately a year ago from myget) this problem was not present then.

cwensley commented 5 years ago

Hey @se5a,

Thanks again for reporting this. I got some time and tested this on Ubuntu 18.04 and Linux Mint 19.1, and it doesn't appear to be a problem (even with Eto 2.4.1). Could you test to verify?

Thanks! Curtis.

se5a commented 5 years ago

I'm pretty busy at work at the moment, and the project I was having the problem with is now using imgui.net, however I think I still have an old version of the project still around. If I've not managed to get around to this within a couple of weeks, give me a reminder.