Ignore:
Timestamp:
02/19/20 10:44:38 (4 years ago)
Author:
bnemhaus
Message:

Frame::Parse has been updated to include a new boolean parameter. When true, widgets that are created as a result of the parse send not only notify the widget framework that they have been added, but are also visible. When false, they only notify they have been added.

The widget framework now distinguishes between added and visible widgets, this fixes a bug. Bug: when programmatically adding a widget to not the current frame, it never gets properly removed and therefore still catches click events from users. By distinguishing between adding and making visible this is avoided.


Another bug has been fixed. Bug: When setting a text item to have a right anchor, and then subsequently reducing the size of the window, this text item would get a width of zero assigned. This was caused by some issues with the logic of how right margins for items were calculated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Text.java

    r1416 r1511  
    393393        @Override
    394394        public void setWidth(Integer width) {
     395                System.err.println("Text::setWidth::Text content=" + getText() + ", new width=" + width);
    395396                invalidateAll();
    396397
     
    400401                        return;
    401402                }
    402 
     403               
     404                if (width == 0) {
     405                        System.err.println("Width of Zero: " + getText());
     406                }
     407               
    403408                _width = width;
    404409                rebuild(true);
     
    17831788
    17841789                if (this.getMinWidth() != null && getTextLayouts().size() == 0 && this.getFont() != null) {
     1790                        // could use any text, 'p' is used simply to get some text in correct font.
    17851791                        getTextLayouts().add(TextLayout.getManager().layoutStringSimple("p", this.getFont()));
    17861792                        isFakeLayout = true;
     
    29102916                        if (anchor != null) {
    29112917                                setX(DisplayController.getFramePaintAreaWidth() - anchor - getBoundsWidth() + getLeftMargin());
     2918                                //System.err.println("Text::setAnchorRight::boundsWidth=" + getBoundsWidth());
    29122919                        }
    29132920                        return;
Note: See TracChangeset for help on using the changeset viewer.