mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 10:00:47 +00:00
floor rects
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38278 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
febd02c44a
commit
0ce6887af8
2 changed files with 10 additions and 7 deletions
|
@ -3,7 +3,7 @@
|
|||
<abstract>Simple box view that can display a border and title
|
||||
</abstract>
|
||||
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2015 Free Software Foundation, Inc.
|
||||
|
||||
Author: Scott Christley <scottc@net-community.com>
|
||||
Date: 1996
|
||||
|
@ -734,7 +734,7 @@
|
|||
- (2 * borderSize.height);
|
||||
|
||||
// center the title cell
|
||||
c = (_bounds.size.width - titleSize.width) / 2;
|
||||
c = floor((_bounds.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = _bounds.origin.x + c;
|
||||
_title_rect.origin.y = _bounds.origin.y + _border_rect.size.height
|
||||
|
@ -770,7 +770,7 @@
|
|||
r.size.height -= titleSize.height + borderSize.height;
|
||||
|
||||
// center the title cell
|
||||
c = (_border_rect.size.width - titleSize.width) / 2;
|
||||
c = floor((_border_rect.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = _border_rect.origin.x + c;
|
||||
_title_rect.origin.y
|
||||
|
@ -825,7 +825,7 @@
|
|||
// r.size.height -= titleSize.height + borderSize.height;
|
||||
|
||||
// center the title cell
|
||||
c = (_border_rect.size.width - titleSize.width) / 2;
|
||||
c = floor((_border_rect.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = _border_rect.origin.x + c;
|
||||
_title_rect.origin.y
|
||||
|
@ -882,7 +882,7 @@
|
|||
r.size.height -= (titleSize.height / 2) + borderSize.height;
|
||||
*/
|
||||
// center the title cell
|
||||
c = (_border_rect.size.width - titleSize.width) / 2;
|
||||
c = floor((_border_rect.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = c;
|
||||
_title_rect.origin.y = 0;
|
||||
|
@ -916,7 +916,7 @@
|
|||
- (2 * borderSize.height);
|
||||
|
||||
// center the title cell
|
||||
c = (_border_rect.size.width - titleSize.width) / 2;
|
||||
c = floor((_border_rect.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = c;
|
||||
_title_rect.origin.y = 0;
|
||||
|
@ -951,7 +951,7 @@
|
|||
r.size.height -= titleSize.height + borderSize.height;
|
||||
|
||||
// center the title cell
|
||||
c = (_border_rect.size.width - titleSize.width) / 2;
|
||||
c = floor((_border_rect.size.width - titleSize.width) / 2);
|
||||
if (c < 0) c = 0;
|
||||
_title_rect.origin.x = _border_rect.origin.x + c;
|
||||
_title_rect.origin.y = _border_rect.origin.y + borderSize.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue