/[svn]/gigedit/trunk/src/gigedit/wrapLabel.cc
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/wrapLabel.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3183 by persson, Sun Apr 29 16:15:45 2012 UTC revision 3184 by schoenebeck, Wed May 17 12:28:39 2017 UTC
# Line 1  Line 1 
1  /* *************************************************************************  /* *************************************************************************
2   * Copyright (c) 2005 VMware, Inc.   * Copyright (c) 2005 VMware, Inc.
3     * Copyright (c) 2011 - 2017 Andreas Persson
4   *   *
5   * Permission is hereby granted, free of charge, to any person obtaining   * Permission is hereby granted, free of charge, to any person obtaining
6   * a copy of this software and associated documentation files (the   * a copy of this software and associated documentation files (the
# Line 187  WrapLabel::SetWrapWidth(int width) // IN Line 188  WrapLabel::SetWrapWidth(int width) // IN
188        return;        return;
189     }     }
190    
191       int xPadding, yPadding;
192       get_padding(xPadding, yPadding);
193    
194       width -= 2 * xPadding;
195    
196     /*     /*
197      * We may need to reset the wrap width, so do this regardless of whether      * We may need to reset the wrap width, so do this regardless of whether
198      * or not we've changed the width.      * or not we've changed the width.
# Line 195  WrapLabel::SetWrapWidth(int width) // IN Line 201  WrapLabel::SetWrapWidth(int width) // IN
201    
202     int unused;     int unused;
203     get_layout()->get_pixel_size(unused, mWrapHeight);     get_layout()->get_pixel_size(unused, mWrapHeight);
204       mWrapHeight += 2 * yPadding;
205    
206     if (mWrapWidth != width) {     if (mWrapWidth != width) {
207        mWrapWidth = width;        mWrapWidth = width;

Legend:
Removed from v.3183  
changed lines
  Added in v.3184

  ViewVC Help
Powered by ViewVC