mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +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
11a55d01f1
commit
db33ab6d5a
2 changed files with 10 additions and 7 deletions
|
@ -3,6 +3,9 @@
|
|||
* Source/GSToolbarView.m (menuForEvent)
|
||||
Use protocol not class for NSMenuItem.
|
||||
|
||||
* Source/NSBox.m
|
||||
floor() rects.
|
||||
|
||||
2014-12-26 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Source/NSWindow.m (_checkTrackingRectangles:forEvent:): Use the
|
||||
|
|
|
@ -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…
Reference in a new issue