Keymap: Center Modifier Keys window in main window
This commit is contained in:
@@ -1,16 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004-2006 Haiku Inc. All rights reserved.
|
* Copyright 2004-2014 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Sandor Vroemisse
|
|
||||||
* Jérôme Duval
|
* Jérôme Duval
|
||||||
|
* John Scipione, [email protected]
|
||||||
|
* Sandor Vroemisse
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "KeymapApplication.h"
|
#include "KeymapApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - KeymapApplication
|
||||||
|
|
||||||
|
|
||||||
KeymapApplication::KeymapApplication()
|
KeymapApplication::KeymapApplication()
|
||||||
:
|
:
|
||||||
BApplication("application/x-vnd.Haiku-Keymap"),
|
BApplication("application/x-vnd.Haiku-Keymap"),
|
||||||
@@ -48,12 +52,13 @@ KeymapApplication::_ShowModifierKeysWindow()
|
|||||||
fModifierKeysWindow->Activate();
|
fModifierKeysWindow->Activate();
|
||||||
else {
|
else {
|
||||||
fModifierKeysWindow = new ModifierKeysWindow();
|
fModifierKeysWindow = new ModifierKeysWindow();
|
||||||
|
fModifierKeysWindow->CenterIn(fWindow->Frame());
|
||||||
fModifierKeysWindow->Show();
|
fModifierKeysWindow->Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - main method
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004-2006 Haiku Inc. All rights reserved.
|
* Copyright 2004-2014 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Sandor Vroemisse
|
|
||||||
* Jérôme Duval
|
* Jérôme Duval
|
||||||
|
* John Scipione, [email protected]
|
||||||
|
* Sandor Vroemisse
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef KEYMAP_APPLICATION_H
|
#ifndef KEYMAP_APPLICATION_H
|
||||||
#define KEYMAP_APPLICATION_H
|
#define KEYMAP_APPLICATION_H
|
||||||
|
|
||||||
@@ -41,4 +41,5 @@ private:
|
|||||||
ModifierKeysWindow* fModifierKeysWindow;
|
ModifierKeysWindow* fModifierKeysWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KEYMAP_APPLICATION_H
|
|
||||||
|
#endif // KEYMAP_APPLICATION_H
|
||||||
|
|||||||
@@ -341,8 +341,6 @@ ModifierKeysWindow::ModifierKeysWindow()
|
|||||||
|
|
||||||
_MarkMenuItems();
|
_MarkMenuItems();
|
||||||
_ValidateDuplicateKeys();
|
_ValidateDuplicateKeys();
|
||||||
|
|
||||||
CenterOnScreen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user