mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:30:38 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8723 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1350905dc8
commit
b768800c21
4 changed files with 130 additions and 56 deletions
|
@ -430,39 +430,55 @@ static Class rulerViewClass = nil;
|
|||
NSDebugLog (@"reflectScrolledClipView:");
|
||||
|
||||
if (_contentView)
|
||||
clipViewBounds = [_contentView bounds];
|
||||
{
|
||||
clipViewBounds = [_contentView bounds];
|
||||
}
|
||||
if ((documentView = [_contentView documentView]))
|
||||
documentFrame = [documentView frame];
|
||||
{
|
||||
documentFrame = [documentView frame];
|
||||
}
|
||||
|
||||
if (_hasVertScroller)
|
||||
{
|
||||
if (documentFrame.size.height <= clipViewBounds.size.height)
|
||||
[_vertScroller setEnabled: NO];
|
||||
{
|
||||
[_vertScroller setEnabled: NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_vertScroller setEnabled: YES];
|
||||
|
||||
knobProportion = clipViewBounds.size.height
|
||||
/ documentFrame.size.height;
|
||||
|
||||
floatValue = (clipViewBounds.origin.y - documentFrame.origin.y)
|
||||
/ (documentFrame.size.height - clipViewBounds.size.height);
|
||||
|
||||
if (!_contentView->_rFlags.flipped_view)
|
||||
floatValue = 1 - floatValue;
|
||||
[_vertScroller setFloatValue: floatValue
|
||||
knobProportion: knobProportion];
|
||||
{
|
||||
floatValue = 1 - floatValue;
|
||||
}
|
||||
[_vertScroller setFloatValue: floatValue
|
||||
knobProportion: knobProportion];
|
||||
}
|
||||
}
|
||||
|
||||
if (_hasHorizScroller)
|
||||
{
|
||||
if (documentFrame.size.width <= clipViewBounds.size.width)
|
||||
[_horizScroller setEnabled: NO];
|
||||
{
|
||||
[_horizScroller setEnabled: NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_horizScroller setEnabled: YES];
|
||||
|
||||
knobProportion = clipViewBounds.size.width
|
||||
/ documentFrame.size.width;
|
||||
|
||||
floatValue = (clipViewBounds.origin.x - documentFrame.origin.x)
|
||||
/ (documentFrame.size.width - clipViewBounds.size.width);
|
||||
|
||||
[_horizScroller setFloatValue: floatValue
|
||||
knobProportion: knobProportion];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue