Commit 5e10a7c6 authored by darin's avatar darin

- fixed 3095854 -- small select boxes get no scrollbar

        * kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines):
	Always use a minimum of 4 lines.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 726fa2c5
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3095854 -- small select boxes get no scrollbar
* kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines):
Always use a minimum of 4 lines.
=== Alexander-32 ===
2002-11-14 Darin Adler <darin@apple.com>
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3095854 -- small select boxes get no scrollbar
* kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines):
Always use a minimum of 4 lines.
=== Alexander-32 ===
2002-11-14 Darin Adler <darin@apple.com>
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3095854 -- small select boxes get no scrollbar
* kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines):
Always use a minimum of 4 lines.
=== Alexander-32 ===
2002-11-14 Darin Adler <darin@apple.com>
......
......@@ -27,6 +27,8 @@
#import "KWQAssertions.h"
#define MIN_LINES 4 /* ensures we have a scroll bar */
@interface KWQListBoxScrollView : NSScrollView
{
}
......@@ -196,7 +198,7 @@ QSize QListBox::sizeForNumberOfLines(int lines) const
NSSize contentSize;
contentSize.width = ceil(width);
contentSize.height = ceil(([tableView rowHeight] + [tableView intercellSpacing].height) * lines);
contentSize.height = ceil(([tableView rowHeight] + [tableView intercellSpacing].height) * MAX(MIN_LINES, lines));
NSSize size = [NSScrollView frameSizeForContentSize:contentSize
hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSBezelBorder];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment