mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Make the caret width a twips value, instead of pixels.
This commit is contained in:
parent
f8b4395e6d
commit
884a0efa99
@ -28,7 +28,7 @@ class nsCaretProperties
|
||||
nsCaretProperties();
|
||||
virtual ~nsCaretProperties() {}
|
||||
|
||||
virtual PRUint32 GetCaretWidth() { return mCaretWidth; }
|
||||
virtual PRInt32 GetCaretWidth() { return mCaretWidth; }
|
||||
virtual PRUint32 GetCaretBlinkRate() { return mBlinkRate; }
|
||||
|
||||
|
||||
@ -37,12 +37,12 @@ class nsCaretProperties
|
||||
// have value for no blinking
|
||||
|
||||
enum {
|
||||
eDefaulBlinkRate = 500, // twice a second
|
||||
eDefaultCaretWidth = 1 // one pixel wide
|
||||
eDefaulBlinkRate = 500, // twice a second
|
||||
eDefaultCaretWidth = 20 // 20 twips = 1 pixel
|
||||
};
|
||||
|
||||
|
||||
PRUint32 mCaretWidth; // caret width in twips
|
||||
PRInt32 mCaretWidth; // caret width in twips
|
||||
PRUint32 mBlinkRate; // blink rate in milliseconds
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ nsCaretProperties::nsCaretProperties()
|
||||
, mBlinkRate(eDefaulBlinkRate)
|
||||
{
|
||||
// in your platform-specific class, get data from the OS in your constructor
|
||||
mCaretWidth = 2; // 2 pixel caret on Windows
|
||||
mCaretWidth = 30; // 2 pixel caret on Windows
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user