diff --git a/appshell.exe.manifest b/appshell.exe.manifest index d36f084b6..979226c1b 100644 --- a/appshell.exe.manifest +++ b/appshell.exe.manifest @@ -1,5 +1,5 @@ - + @@ -17,4 +17,10 @@ + + + true + + + diff --git a/appshell/TrafficLightButton.mm b/appshell/TrafficLightButton.mm index bc7220c9d..0e64faa6e 100644 --- a/appshell/TrafficLightButton.mm +++ b/appshell/TrafficLightButton.mm @@ -70,15 +70,15 @@ - (void)setup { } else if ([self tag] == ZOOM_BUTTON_TAG){ buttonName = @"zoom"; } - active = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-active",buttonName]]; - inactive = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-inactive",buttonName]]; - hover = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-hover",buttonName]]; - pressed = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-pressed",buttonName]]; + active = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-active",buttonName]] retain]; + inactive = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-inactive",buttonName]] retain]; + hover = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-hover",buttonName]] retain]; + pressed = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-pressed",buttonName]] retain]; if (closeButton) { - dirtyActive = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-active",buttonName]]; - dirtyInactive = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-inactive",buttonName]]; - dirtyHover = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-hover",buttonName]]; - dirtyPressed = [NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-pressed",buttonName]]; + dirtyActive = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-active",buttonName]] retain]; + dirtyInactive = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-inactive",buttonName]] retain]; + dirtyHover = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-hover",buttonName]] retain]; + dirtyPressed = [[NSImage imageNamed:[NSString stringWithFormat:@"window-%@-dirty-pressed",buttonName]] retain]; } // assume active @@ -162,29 +162,29 @@ -(void)updateButtonStates{ if (self == nil) return; if (pressedState) { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyPressed) { [self setImage:dirtyPressed]; - } else { + } else if (pressed) { [self setImage:pressed]; } } else if (activeState) { if (hoverState) { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyHover) { [self setImage:dirtyHover]; - } else { + } else if (hover) { [self setImage:hover]; } } else { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyActive) { [self setImage:dirtyActive]; - } else { + } else if (active) { [self setImage:active]; } } } else { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyInactive) { [self setImage:dirtyInactive]; - } else { + } else if (inactive) { [self setImage:inactive]; } } @@ -194,9 +194,9 @@ - (void)hoverIn:(NSNotification *) notification { if ([[notification object] isEqual:[self superview]]) { hoverState = YES; - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyHover) { [self setImage:dirtyHover]; - } else { + } else if (hover) { [self setImage:hover]; } } @@ -205,15 +205,15 @@ - (void)hoverIn:(NSNotification *) notification { - (void)hoverOut { hoverState = NO; if (activeState) { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyActive) { [self setImage:dirtyActive]; - } else { + } else if (active) { [self setImage:active]; } } else { - if (closeButton && dirtyState) { + if (closeButton && dirtyState && dirtyInactive) { [self setImage:dirtyInactive]; - } else { + } else if (inactive) { [self setImage:inactive]; } } diff --git a/appshell/appshell_extensions.cpp b/appshell/appshell_extensions.cpp index 9d19add2c..f259cae42 100644 --- a/appshell/appshell_extensions.cpp +++ b/appshell/appshell_extensions.cpp @@ -684,8 +684,35 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate { } else if (message_name == "DragWindow") { // Parameters: none DragWindow(browser); - } - else { + } else if (message_name == "GetZoomLevel") { + // Parameters: + // 0: int32 - callback id + double zoomLevel = browser->GetHost()->GetZoomLevel(); + + responseArgs->SetDouble(2, zoomLevel); + } else if (message_name == "SetZoomLevel") { + // Parameters: + // 0: int32 - callback id + // 1: int32 - zoom level + + if (argList->GetSize() != 2 || + !(argList->GetType(1) == VTYPE_INT || argList->GetType(1) == VTYPE_DOUBLE)) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + // cast to double + double zoomLevel = 1; + + if (argList->GetType(1) == VTYPE_DOUBLE) { + zoomLevel = argList->GetDouble(1); + } else { + zoomLevel = argList->GetInt(1); + } + + browser->GetHost()->SetZoomLevel(zoomLevel); + } + } else { fprintf(stderr, "Native function not implemented yet: %s\n", message_name.c_str()); return false; } diff --git a/appshell/appshell_extensions.js b/appshell/appshell_extensions.js index efc6aa6ae..88595fff3 100644 --- a/appshell/appshell_extensions.js +++ b/appshell/appshell_extensions.js @@ -807,6 +807,28 @@ if (!appshell.app) { appshell.app.dragWindow = function () { DragWindow(); }; + + /** + * Get the browser zoom level + * + * @return None. This is an asynchronous call that sends all return information to the callback. + */ + native function GetZoomLevel(); + appshell.app.getZoomLevel = function (callback) { + GetZoomLevel(callback || _dummyCallback); + }; + + /** + * Set the browser zoom level + * + * @param {number} + * + * @return None. This is an asynchronous call that sends all return information to the callback. + */ + native function SetZoomLevel(); + appshell.app.setZoomLevel = function (zoomLevel, callback) { + SetZoomLevel(callback || _dummyCallback, zoomLevel); + }; // Alias the appshell object to brackets. This is temporary and should be removed. brackets = appshell; diff --git a/appshell/appshell_extensions_gtk.cpp b/appshell/appshell_extensions_gtk.cpp index 4cb37ab1f..2e6b3aed5 100644 --- a/appshell/appshell_extensions_gtk.cpp +++ b/appshell/appshell_extensions_gtk.cpp @@ -164,15 +164,20 @@ int32 ShowOpenDialog(bool allowMultipleSelection, CefRefPtr& selectedFiles) { GtkWidget *dialog; - const char* dialog_title = chooseDirectory ? "Open Directory" : "Open File"; GtkFileChooserAction file_or_directory = chooseDirectory ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER : GTK_FILE_CHOOSER_ACTION_OPEN ; - dialog = gtk_file_chooser_dialog_new (dialog_title, + dialog = gtk_file_chooser_dialog_new (title.c_str(), NULL, file_or_directory, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + if (!initialDirectory.empty()) + { + ExtensionString folderURI = std::string("file:///") + initialDirectory; + gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog), folderURI.c_str()); + } + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; @@ -297,7 +302,7 @@ int32 MakeDir(ExtensionString path, int mode) file = g_file_new_for_path(pathStr); mode = mode | 0777; - if (!g_file_make_directory(file, NULL, &gerror)) { + if (!g_file_make_directory_with_parents(file, NULL, &gerror)) { error = GErrorToErrorCode(gerror); } g_object_unref(file); diff --git a/appshell/appshell_extensions_mac.mm b/appshell/appshell_extensions_mac.mm index dea83066f..0be89f5dc 100644 --- a/appshell/appshell_extensions_mac.mm +++ b/appshell/appshell_extensions_mac.mm @@ -1013,12 +1013,29 @@ NSUInteger processKeyString(ExtensionString& key) appshell_extensions::fixupKey(key, "Opt-", "")) { mask |= NSAlternateKeyMask; } + + unichar pageUpChar = NSPageUpFunctionKey; + unichar pageDownChar = NSPageDownFunctionKey; + unichar homeChar = NSHomeFunctionKey; + unichar endChar = NSEndFunctionKey; + unichar insertChar = NSHelpFunctionKey; + //replace special keys with ones expected by keyEquivalent - const ExtensionString del = (ExtensionString() += NSDeleteCharacter); + const ExtensionString pageUp = (ExtensionString() += [[NSString stringWithCharacters: &pageUpChar length: 1] UTF8String]); + const ExtensionString pageDown = (ExtensionString() += [[NSString stringWithCharacters: &pageDownChar length: 1] UTF8String]); + const ExtensionString home = (ExtensionString() += [[NSString stringWithCharacters: &homeChar length: 1] UTF8String]); + const ExtensionString end = (ExtensionString() += [[NSString stringWithCharacters: &endChar length: 1] UTF8String]); + const ExtensionString ins = (ExtensionString() += [[NSString stringWithCharacters: &insertChar length: 1] UTF8String]); + const ExtensionString del = (ExtensionString() += NSDeleteCharacter); const ExtensionString backspace = (ExtensionString() += NSBackspaceCharacter); - const ExtensionString tab = (ExtensionString() += NSTabCharacter); - const ExtensionString enter = (ExtensionString() += NSEnterCharacter); - + const ExtensionString tab = (ExtensionString() += NSTabCharacter); + const ExtensionString enter = (ExtensionString() += NSEnterCharacter); + + appshell_extensions::fixupKey(key, "PageUp", pageUp); + appshell_extensions::fixupKey(key, "PageDown", pageDown); + appshell_extensions::fixupKey(key, "Home", home); + appshell_extensions::fixupKey(key, "End", end); + appshell_extensions::fixupKey(key, "Insert", ins); appshell_extensions::fixupKey(key, "Delete", del); appshell_extensions::fixupKey(key, "Backspace", backspace); appshell_extensions::fixupKey(key, "Space", " "); diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp index e79d75ba9..a6e76cfd4 100644 --- a/appshell/appshell_extensions_win.cpp +++ b/appshell/appshell_extensions_win.cpp @@ -1487,6 +1487,10 @@ bool UpdateAcceleratorTable(int32 tag, ExtensionString& keyStr) lpaccelNew[newItem].key = VK_TAB; } else if (keyStr.find(L"ENTER") != ExtensionString::npos) { lpaccelNew[newItem].key = VK_RETURN; + } else if (keyStr.find(L"PAGEUP") != ExtensionString::npos) { + lpaccelNew[newItem].key = VK_PRIOR; + } else if (keyStr.find(L"PAGEDOWN") != ExtensionString::npos) { + lpaccelNew[newItem].key = VK_NEXT; } else if (keyStr.find(L"UP") != ExtensionString::npos) { lpaccelNew[newItem].key = VK_UP; } else if (keyStr.find(L"DOWN") != ExtensionString::npos) { diff --git a/appshell/cef_dark_window.cpp b/appshell/cef_dark_window.cpp index d406294f1..8779bc3be 100644 --- a/appshell/cef_dark_window.cpp +++ b/appshell/cef_dark_window.cpp @@ -30,6 +30,46 @@ #define OS_WIN #include "config.h" +//win HiDPI - Macro for loading button resources for scale factors start +#define BUTTON_RESOURCES(scale)\ + if (mSysCloseButton == NULL) {\ + mSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_BUTTON_ ## scale));\ + }\ + if (mSysMaximizeButton == NULL) {\ + mSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_BUTTON_ ## scale));\ + }\ + if (mSysMinimizeButton == NULL) {\ + mSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_BUTTON_ ## scale));\ + }\ + if (mSysRestoreButton == NULL) {\ + mSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_BUTTON_ ## scale));\ + }\ + if (mHoverSysCloseButton == NULL) {\ + mHoverSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_HOVER_BUTTON_ ## scale));\ + }\ + if (mHoverSysRestoreButton == NULL) {\ + mHoverSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_HOVER_BUTTON_ ## scale));\ + }\ + if (mHoverSysMinimizeButton == NULL) {\ + mHoverSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_HOVER_BUTTON_ ## scale));\ + }\ + if (mHoverSysMaximizeButton == NULL) {\ + mHoverSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_HOVER_BUTTON_ ## scale));\ + }\ + if (mPressedSysCloseButton == NULL) {\ + mPressedSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_PRESSED_BUTTON_ ## scale));\ + }\ + if (mPressedSysRestoreButton == NULL) {\ + mPressedSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_PRESSED_BUTTON_ ## scale));\ + }\ + if (mPressedSysMinimizeButton == NULL) {\ + mPressedSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_PRESSED_BUTTON_ ## scale));\ + }\ + if (mPressedSysMaximizeButton == NULL) {\ + mPressedSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_PRESSED_BUTTON_ ## scale));\ + } +//Macro for loading button resources end + // Libraries #pragma comment(lib, "gdiplus") #pragma comment(lib, "UxTheme") @@ -190,41 +230,27 @@ void cef_dark_window::InitMenuFont() */ void cef_dark_window::LoadSysButtonImages() { - if (mSysCloseButton == NULL) { - mSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_BUTTON)); - } - if (mSysMaximizeButton == NULL) { - mSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_BUTTON)); - } - if (mSysMinimizeButton == NULL) { - mSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_BUTTON)); - } - if (mSysRestoreButton == NULL) { - mSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_BUTTON)); - } - if (mHoverSysCloseButton == NULL) { - mHoverSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_HOVER_BUTTON)); - } - if (mHoverSysRestoreButton == NULL) { - mHoverSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_HOVER_BUTTON)); - } - if (mHoverSysMinimizeButton == NULL) { - mHoverSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_HOVER_BUTTON)); - } - if (mHoverSysMaximizeButton == NULL) { - mHoverSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_HOVER_BUTTON)); + UINT scaleFactor = GetDPIScalingX(); + + if(scaleFactor>=250) + { + BUTTON_RESOURCES(2_5X) } - if (mPressedSysCloseButton == NULL) { - mPressedSysCloseButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_CLOSE_PRESSED_BUTTON)); + else if(scaleFactor>=200) + { + BUTTON_RESOURCES(2X) } - if (mPressedSysRestoreButton == NULL) { - mPressedSysRestoreButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_RESTORE_PRESSED_BUTTON)); + else if(scaleFactor>=150) + { + BUTTON_RESOURCES(1_5X) } - if (mPressedSysMinimizeButton == NULL) { - mPressedSysMinimizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MIN_PRESSED_BUTTON)); + else if(scaleFactor>=125) + { + BUTTON_RESOURCES(1_25X) } - if (mPressedSysMaximizeButton == NULL) { - mPressedSysMaximizeButton = ResourceImage::FromResource(MAKEINTRESOURCE(IDB_MAX_PRESSED_BUTTON)); + else + { + BUTTON_RESOURCES(1X) } } diff --git a/appshell/cef_host_window.cpp b/appshell/cef_host_window.cpp index 14e86d4cc..bd45a9cc7 100644 --- a/appshell/cef_host_window.cpp +++ b/appshell/cef_host_window.cpp @@ -168,7 +168,20 @@ BOOL cef_host_window::HandleSize(BOOL bMinimize) } SetProp(L"WasMinimized", (HANDLE)bMinimize); #endif + NotifyWindowMovedOrResized(); + return FALSE; +} +void cef_host_window::NotifyWindowMovedOrResized() +{ + if (GetBrowser() && GetBrowser()->GetHost()) { + GetBrowser()->GetHost()->NotifyMoveOrResizeStarted(); + } +} + +BOOL cef_host_window::HandleMoveOrMoving() +{ + NotifyWindowMovedOrResized(); return FALSE; } @@ -198,6 +211,11 @@ LRESULT cef_host_window::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) if (HandleInitMenuPopup((HMENU)wParam)) return 0L; break; + case WM_MOVING: + case WM_MOVE: + if (HandleMoveOrMoving()) + return 0L; + break; } diff --git a/appshell/cef_host_window.h b/appshell/cef_host_window.h index 9bca2c40a..932444a4a 100644 --- a/appshell/cef_host_window.h +++ b/appshell/cef_host_window.h @@ -63,6 +63,7 @@ class cef_host_window : public cef_host_window_base // Message Handlers BOOL HandleInitMenuPopup(HMENU hMenuPopup); BOOL HandleSize(BOOL bMinimize); + BOOL HandleMoveOrMoving(); // Command Implementation BOOL DoCommand(UINT commandId, CefRefPtr callback = 0); @@ -70,6 +71,7 @@ class cef_host_window : public cef_host_window_base // Implementation virtual void DoRepaintClientArea(); + void NotifyWindowMovedOrResized(); // Helper to get a command string from command id CefString GetCommandString(UINT commandId); diff --git a/appshell/cef_main_window.cpp b/appshell/cef_main_window.cpp index 1909b55c8..51305c81d 100644 --- a/appshell/cef_main_window.cpp +++ b/appshell/cef_main_window.cpp @@ -99,6 +99,60 @@ LPCWSTR cef_main_window::GetBracketsWindowTitleText() return szTitle; } +void cef_main_window::EnsureWindowRectVisibility(int& left, int& top, int& width, int& height, int showCmd) +{ + static const int kWindowFrameSize = 8; + + // don't check if we're already letting + // Windows determine the window placement + if (left == CW_USEDEFAULT && + top == CW_USEDEFAULT && + width == CW_USEDEFAULT && + height == CW_USEDEFAULT) { + return; + } + + // The virtual display is the bounding rect of all monitors + // see http://msdn.microsoft.com/en-us/library/dd162729(v=vs.85).aspx + + int xScreen = ::GetSystemMetrics(SM_XVIRTUALSCREEN); + int yScreen = ::GetSystemMetrics(SM_YVIRTUALSCREEN); + int cxScreen = ::GetSystemMetrics(SM_CXVIRTUALSCREEN); + int cyScreen = ::GetSystemMetrics(SM_CYVIRTUALSCREEN); + + // make a copy, we need to adjust the comparison + // if it's a maximized window because the OS move the + // origin of the window by 8 pixes to releive the borders + // from the monitor for legacy apps + int xLeft = left; + int xTop = top; + int xWidth = width; + int xHeight = height; + + if (showCmd == SW_MAXIMIZE) { + xLeft += kWindowFrameSize; + xTop += kWindowFrameSize; + xWidth -= kWindowFrameSize * 2; + xHeight -= kWindowFrameSize * 2; + } + + // Make sure the window fits inside the virtual screen. + // If it doesn't then we let windows decide the window placement + if (xLeft < xScreen || + xTop < yScreen || + xLeft + xWidth > xScreen + cxScreen || + xTop + xHeight > yScreen + cyScreen) { + + // something was off-screen so reposition + // to the default window placement + left = CW_USEDEFAULT; + top = CW_USEDEFAULT; + width = CW_USEDEFAULT; + height = CW_USEDEFAULT; + } +} + + // Create Method. Call this to create a cef_main_window instance BOOL cef_main_window::Create() { @@ -108,10 +162,14 @@ BOOL cef_main_window::Create() int top = CW_USEDEFAULT; int width = CW_USEDEFAULT; int height = CW_USEDEFAULT; + int showCmd = SW_SHOW; LoadWindowRestoreRect(left, top, width, height, showCmd); + // make sure the window is visible + EnsureWindowRectVisibility(left, top, width, height, showCmd); + DWORD styles = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_EX_COMPOSITED; if (showCmd == SW_MAXIMIZE) @@ -353,8 +411,32 @@ void cef_main_window::RestoreWindowPlacement(int showCmd) GetRegistryInt(::kWindowPostionFolder, ::kPrefRestoreRight, NULL, (int&)wp.rcNormalPosition.right); GetRegistryInt(::kWindowPostionFolder, ::kPrefRestoreBottom, NULL, (int&)wp.rcNormalPosition.bottom); - // This returns FALSE on failure but not sure what we could do in that case - SetWindowPlacement(&wp); + ::NormalizeRect(wp.rcNormalPosition); + + int left = wp.rcNormalPosition.left; + int top = wp.rcNormalPosition.top; + int width = wp.rcNormalPosition.right - left; + int height = wp.rcNormalPosition.bottom - top; + + EnsureWindowRectVisibility(left, top, width, height, SW_SHOWNORMAL); + + // presumably they would all be set to CW_USEDEFAULT + // but we check for any out-of-bounds value and + // bypass the restore rect as to let Windows decide + if (left != CW_USEDEFAULT && + top != CW_USEDEFAULT && + height != CW_USEDEFAULT && + width != CW_USEDEFAULT) { + + wp.rcNormalPosition.left = left; + wp.rcNormalPosition.top = top; + + wp.rcNormalPosition.right = wp.rcNormalPosition.left + width; + wp.rcNormalPosition.bottom = wp.rcNormalPosition.top + height; + + // This returns FALSE on failure but not sure what we could do in that case + SetWindowPlacement(&wp); + } } ShowWindow(showCmd); diff --git a/appshell/cef_main_window.h b/appshell/cef_main_window.h index a23f798c0..0890af9e7 100644 --- a/appshell/cef_main_window.h +++ b/appshell/cef_main_window.h @@ -47,6 +47,7 @@ class cef_main_window : public cef_host_window void SaveWindowRestoreRect(); void LoadWindowRestoreRect(int& left, int& top, int& width, int& height, int& showCmd); void RestoreWindowPlacement(int showCmd); + void EnsureWindowRectVisibility(int& left, int& top, int& width, int& height, int showCmd); // Message Handlers BOOL HandleEraseBackground(HDC hdc); diff --git a/appshell/cef_window.cpp b/appshell/cef_window.cpp index 41db38be0..88139d748 100644 --- a/appshell/cef_window.cpp +++ b/appshell/cef_window.cpp @@ -21,6 +21,10 @@ */ #include "cef_window.h" +//DEFINES +//HiDPI The default logical DPI when scaling is applied in windows. see. https://msdn.microsoft.com/en-us/library/ms701681(v=vs.85).aspx +#define DEFAULT_WINDOWS_DPI 96 + // Externals extern HINSTANCE hInst; @@ -347,3 +351,13 @@ BOOL cef_window::TrackNonClientMouseEvents(bool track/*=true*/) return ::TrackMouseEvent (&tme); } + +//Get the Horizontal DPI scaling factor. +UINT cef_window::GetDPIScalingX() const +{ + HDC dc = GetDC(); + float lpx = dc ? GetDeviceCaps(dc,LOGPIXELSX):DEFAULT_WINDOWS_DPI ; + //scale factor as it would look in a default(96dpi) screen. the default will be always 96 logical DPI when scaling is applied in windows. + //see. https://msdn.microsoft.com/en-us/library/ms701681(v=vs.85).aspx + return (lpx/DEFAULT_WINDOWS_DPI)*100; +} \ No newline at end of file diff --git a/appshell/cef_window.h b/appshell/cef_window.h index 2d71970de..cf6f3a9e8 100644 --- a/appshell/cef_window.h +++ b/appshell/cef_window.h @@ -74,6 +74,7 @@ static __inline int RectHeight(const RECT &rIn) #define DCX_USESTYLE 0x00010000 #endif + // cef_window is a basic HWND wrapper // that can be used to wrap any HWND class cef_window @@ -169,7 +170,7 @@ class cef_window HDC GetWindowDC() { return ::GetWindowDC(mWnd); } - HDC GetDC() + HDC GetDC() const { return ::GetDC(mWnd); } int ReleaseDC(HDC dc) @@ -229,6 +230,8 @@ class cef_window HWND GetWindow(UINT uCmd) { return ::GetWindow(mWnd, uCmd); } + UINT GetDPIScalingX() const; + protected: // Attributes - Protected Members HWND mWnd; diff --git a/appshell/cefclient.rc b/appshell/cefclient.rc index f59eae034..70c3d19d2 100644 --- a/appshell/cefclient.rc +++ b/appshell/cefclient.rc @@ -46,19 +46,70 @@ IDI_CEFCLIENT ICON "res\\appshell.ico" // // PNG // -IDB_CLOSE_BUTTON PNG "res\\close.png" -IDB_CLOSE_HOVER_BUTTON PNG "res\\close-hover.png" -IDB_CLOSE_PRESSED_BUTTON PNG "res\\close-pressed.png" -IDB_MAX_BUTTON PNG "res\\max.png" -IDB_MAX_HOVER_BUTTON PNG "res\\max-hover.png" -IDB_MAX_PRESSED_BUTTON PNG "res\\max-pressed.png" -IDB_MIN_BUTTON PNG "res\\min.png" -IDB_MIN_HOVER_BUTTON PNG "res\\min-hover.png" -IDB_MIN_PRESSED_BUTTON PNG "res\\min-pressed.png" -IDB_RESTORE_BUTTON PNG "res\\restore.png" -IDB_RESTORE_HOVER_BUTTON PNG "res\\restore-hover.png" -IDB_RESTORE_PRESSED_BUTTON PNG "res\\restore-pressed.png" - +IDB_CLOSE_BUTTON_1X PNG "res\\close.png" +IDB_CLOSE_HOVER_BUTTON_1X PNG "res\\close-hover.png" +IDB_CLOSE_PRESSED_BUTTON_1X PNG "res\\close-pressed.png" +IDB_MAX_BUTTON_1X PNG "res\\max.png" +IDB_MAX_HOVER_BUTTON_1X PNG "res\\max-hover.png" +IDB_MAX_PRESSED_BUTTON_1X PNG "res\\max-pressed.png" +IDB_MIN_BUTTON_1X PNG "res\\min.png" +IDB_MIN_HOVER_BUTTON_1X PNG "res\\min-hover.png" +IDB_MIN_PRESSED_BUTTON_1X PNG "res\\min-pressed.png" +IDB_RESTORE_BUTTON_1X PNG "res\\restore.png" +IDB_RESTORE_HOVER_BUTTON_1X PNG "res\\restore-hover.png" +IDB_RESTORE_PRESSED_BUTTON_1X PNG "res\\restore-pressed.png" + +IDB_CLOSE_BUTTON_1_25X PNG "res\\1.25x\\close.png" +IDB_CLOSE_HOVER_BUTTON_1_25X PNG "res\\1.25x\\close-hover.png" +IDB_CLOSE_PRESSED_BUTTON_1_25X PNG "res\\1.25x\\close-pressed.png" +IDB_MAX_BUTTON_1_25X PNG "res\\1.25x\\max.png" +IDB_MAX_HOVER_BUTTON_1_25X PNG "res\\1.25x\\max-hover.png" +IDB_MAX_PRESSED_BUTTON_1_25X PNG "res\\1.25x\\max-pressed.png" +IDB_MIN_BUTTON_1_25X PNG "res\\1.25x\\min.png" +IDB_MIN_HOVER_BUTTON_1_25X PNG "res\\1.25x\\min-hover.png" +IDB_MIN_PRESSED_BUTTON_1_25X PNG "res\\1.25x\\min-pressed.png" +IDB_RESTORE_BUTTON_1_25X PNG "res\\1.25x\\restore.png" +IDB_RESTORE_HOVER_BUTTON_1_25X PNG "res\\1.25x\\restore-hover.png" +IDB_RESTORE_PRESSED_BUTTON_1_25X PNG "res\\1.25x\\restore-pressed.png" + +IDB_CLOSE_BUTTON_1_5X PNG "res\\1.5x\\close.png" +IDB_CLOSE_HOVER_BUTTON_1_5X PNG "res\\1.5x\\close-hover.png" +IDB_CLOSE_PRESSED_BUTTON_1_5X PNG "res\\1.5x\\close-pressed.png" +IDB_MAX_BUTTON_1_5X PNG "res\\1.5x\\max.png" +IDB_MAX_HOVER_BUTTON_1_5X PNG "res\\1.5x\\max-hover.png" +IDB_MAX_PRESSED_BUTTON_1_5X PNG "res\\1.5x\\max-pressed.png" +IDB_MIN_BUTTON_1_5X PNG "res\\1.5x\\min.png" +IDB_MIN_HOVER_BUTTON_1_5X PNG "res\\1.5x\\min-hover.png" +IDB_MIN_PRESSED_BUTTON_1_5X PNG "res\\1.5x\\min-pressed.png" +IDB_RESTORE_BUTTON_1_5X PNG "res\\1.5x\\restore.png" +IDB_RESTORE_HOVER_BUTTON_1_5X PNG "res\\1.5x\\restore-hover.png" +IDB_RESTORE_PRESSED_BUTTON_1_5X PNG "res\\1.5x\\restore-pressed.png" + +IDB_CLOSE_BUTTON_2X PNG "res\\2x\\close.png" +IDB_CLOSE_HOVER_BUTTON_2X PNG "res\\2x\\close-hover.png" +IDB_CLOSE_PRESSED_BUTTON_2X PNG "res\\2x\\close-pressed.png" +IDB_MAX_BUTTON_2X PNG "res\\2x\\max.png" +IDB_MAX_HOVER_BUTTON_2X PNG "res\\2x\\max-hover.png" +IDB_MAX_PRESSED_BUTTON_2X PNG "res\\2x\\max-pressed.png" +IDB_MIN_BUTTON_2X PNG "res\\2x\\min.png" +IDB_MIN_HOVER_BUTTON_2X PNG "res\\2x\\min-hover.png" +IDB_MIN_PRESSED_BUTTON_2X PNG "res\\2x\\min-pressed.png" +IDB_RESTORE_BUTTON_2X PNG "res\\2x\\restore.png" +IDB_RESTORE_HOVER_BUTTON_2X PNG "res\\2x\\restore-hover.png" +IDB_RESTORE_PRESSED_BUTTON_2X PNG "res\\2x\\restore-pressed.png" + +IDB_CLOSE_BUTTON_2_5X PNG "res\\2.5x\\close.png" +IDB_CLOSE_HOVER_BUTTON_2_5X PNG "res\\2.5x\\close-hover.png" +IDB_CLOSE_PRESSED_BUTTON_2_5X PNG "res\\2.5x\\close-pressed.png" +IDB_MAX_BUTTON_2_5X PNG "res\\2.5x\\max.png" +IDB_MAX_HOVER_BUTTON_2_5X PNG "res\\2.5x\\max-hover.png" +IDB_MAX_PRESSED_BUTTON_2_5X PNG "res\\2.5x\\max-pressed.png" +IDB_MIN_BUTTON_2_5X PNG "res\\2.5x\\min.png" +IDB_MIN_HOVER_BUTTON_2_5X PNG "res\\2.5x\\min-hover.png" +IDB_MIN_PRESSED_BUTTON_2_5X PNG "res\\2.5x\\min-pressed.png" +IDB_RESTORE_BUTTON_2_5X PNG "res\\2.5x\\restore.png" +IDB_RESTORE_HOVER_BUTTON_2_5X PNG "res\\2.5x\\restore-hover.png" +IDB_RESTORE_PRESSED_BUTTON_2_5X PNG "res\\2.5x\\restore-pressed.png" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// diff --git a/appshell/mac/Info.plist b/appshell/mac/Info.plist index 2c05e0846..211b1a813 100644 --- a/appshell/mac/Info.plist +++ b/appshell/mac/Info.plist @@ -19,9 +19,9 @@ CFBundleSignature ???? CFBundleVersion - 1.1.0 + 1.2.0 CFBundleShortVersionString - 1.1.0 + 1.2.0 NSMainNibFile MainMenu NSPrincipalClass diff --git a/appshell/res/1.25x/close-hover.png b/appshell/res/1.25x/close-hover.png new file mode 100644 index 000000000..c66293a10 Binary files /dev/null and b/appshell/res/1.25x/close-hover.png differ diff --git a/appshell/res/1.25x/close-pressed.png b/appshell/res/1.25x/close-pressed.png new file mode 100644 index 000000000..e75b50ece Binary files /dev/null and b/appshell/res/1.25x/close-pressed.png differ diff --git a/appshell/res/1.25x/close.png b/appshell/res/1.25x/close.png new file mode 100644 index 000000000..b7fe2f180 Binary files /dev/null and b/appshell/res/1.25x/close.png differ diff --git a/appshell/res/1.25x/max-hover.png b/appshell/res/1.25x/max-hover.png new file mode 100644 index 000000000..747105523 Binary files /dev/null and b/appshell/res/1.25x/max-hover.png differ diff --git a/appshell/res/1.25x/max-pressed.png b/appshell/res/1.25x/max-pressed.png new file mode 100644 index 000000000..6dd38963e Binary files /dev/null and b/appshell/res/1.25x/max-pressed.png differ diff --git a/appshell/res/1.25x/max.png b/appshell/res/1.25x/max.png new file mode 100644 index 000000000..f641868e0 Binary files /dev/null and b/appshell/res/1.25x/max.png differ diff --git a/appshell/res/1.25x/min-hover.png b/appshell/res/1.25x/min-hover.png new file mode 100644 index 000000000..9fbcb31e7 Binary files /dev/null and b/appshell/res/1.25x/min-hover.png differ diff --git a/appshell/res/1.25x/min-pressed.png b/appshell/res/1.25x/min-pressed.png new file mode 100644 index 000000000..f1f84b05c Binary files /dev/null and b/appshell/res/1.25x/min-pressed.png differ diff --git a/appshell/res/1.25x/min.png b/appshell/res/1.25x/min.png new file mode 100644 index 000000000..c19f50912 Binary files /dev/null and b/appshell/res/1.25x/min.png differ diff --git a/appshell/res/1.25x/restore-hover.png b/appshell/res/1.25x/restore-hover.png new file mode 100644 index 000000000..7b9d9b1bf Binary files /dev/null and b/appshell/res/1.25x/restore-hover.png differ diff --git a/appshell/res/1.25x/restore-pressed.png b/appshell/res/1.25x/restore-pressed.png new file mode 100644 index 000000000..3a437c1fd Binary files /dev/null and b/appshell/res/1.25x/restore-pressed.png differ diff --git a/appshell/res/1.25x/restore.png b/appshell/res/1.25x/restore.png new file mode 100644 index 000000000..f67fff789 Binary files /dev/null and b/appshell/res/1.25x/restore.png differ diff --git a/appshell/res/1.5x/close-hover.png b/appshell/res/1.5x/close-hover.png new file mode 100644 index 000000000..01dc4e8de Binary files /dev/null and b/appshell/res/1.5x/close-hover.png differ diff --git a/appshell/res/1.5x/close-pressed.png b/appshell/res/1.5x/close-pressed.png new file mode 100644 index 000000000..7d4e877f8 Binary files /dev/null and b/appshell/res/1.5x/close-pressed.png differ diff --git a/appshell/res/1.5x/close.png b/appshell/res/1.5x/close.png new file mode 100644 index 000000000..106a6edae Binary files /dev/null and b/appshell/res/1.5x/close.png differ diff --git a/appshell/res/1.5x/max-hover.png b/appshell/res/1.5x/max-hover.png new file mode 100644 index 000000000..39d58c6ff Binary files /dev/null and b/appshell/res/1.5x/max-hover.png differ diff --git a/appshell/res/1.5x/max-pressed.png b/appshell/res/1.5x/max-pressed.png new file mode 100644 index 000000000..b940e88dc Binary files /dev/null and b/appshell/res/1.5x/max-pressed.png differ diff --git a/appshell/res/1.5x/max.png b/appshell/res/1.5x/max.png new file mode 100644 index 000000000..4bfa5895e Binary files /dev/null and b/appshell/res/1.5x/max.png differ diff --git a/appshell/res/1.5x/min-hover.png b/appshell/res/1.5x/min-hover.png new file mode 100644 index 000000000..8539b52b0 Binary files /dev/null and b/appshell/res/1.5x/min-hover.png differ diff --git a/appshell/res/1.5x/min-pressed.png b/appshell/res/1.5x/min-pressed.png new file mode 100644 index 000000000..cd39b837d Binary files /dev/null and b/appshell/res/1.5x/min-pressed.png differ diff --git a/appshell/res/1.5x/min.png b/appshell/res/1.5x/min.png new file mode 100644 index 000000000..39761b7ac Binary files /dev/null and b/appshell/res/1.5x/min.png differ diff --git a/appshell/res/1.5x/restore-hover.png b/appshell/res/1.5x/restore-hover.png new file mode 100644 index 000000000..5268725ea Binary files /dev/null and b/appshell/res/1.5x/restore-hover.png differ diff --git a/appshell/res/1.5x/restore-pressed.png b/appshell/res/1.5x/restore-pressed.png new file mode 100644 index 000000000..d64254710 Binary files /dev/null and b/appshell/res/1.5x/restore-pressed.png differ diff --git a/appshell/res/1.5x/restore.png b/appshell/res/1.5x/restore.png new file mode 100644 index 000000000..5561ac01d Binary files /dev/null and b/appshell/res/1.5x/restore.png differ diff --git a/appshell/res/2.5x/close-hover.png b/appshell/res/2.5x/close-hover.png new file mode 100644 index 000000000..acbc76740 Binary files /dev/null and b/appshell/res/2.5x/close-hover.png differ diff --git a/appshell/res/2.5x/close-pressed.png b/appshell/res/2.5x/close-pressed.png new file mode 100644 index 000000000..607b853b8 Binary files /dev/null and b/appshell/res/2.5x/close-pressed.png differ diff --git a/appshell/res/2.5x/close.png b/appshell/res/2.5x/close.png new file mode 100644 index 000000000..f1a3790ef Binary files /dev/null and b/appshell/res/2.5x/close.png differ diff --git a/appshell/res/2.5x/max-hover.png b/appshell/res/2.5x/max-hover.png new file mode 100644 index 000000000..d999cdd02 Binary files /dev/null and b/appshell/res/2.5x/max-hover.png differ diff --git a/appshell/res/2.5x/max-pressed.png b/appshell/res/2.5x/max-pressed.png new file mode 100644 index 000000000..b1647aa50 Binary files /dev/null and b/appshell/res/2.5x/max-pressed.png differ diff --git a/appshell/res/2.5x/max.png b/appshell/res/2.5x/max.png new file mode 100644 index 000000000..b5688b406 Binary files /dev/null and b/appshell/res/2.5x/max.png differ diff --git a/appshell/res/2.5x/min-hover.png b/appshell/res/2.5x/min-hover.png new file mode 100644 index 000000000..312d1ab9f Binary files /dev/null and b/appshell/res/2.5x/min-hover.png differ diff --git a/appshell/res/2.5x/min-pressed.png b/appshell/res/2.5x/min-pressed.png new file mode 100644 index 000000000..f5671553c Binary files /dev/null and b/appshell/res/2.5x/min-pressed.png differ diff --git a/appshell/res/2.5x/min.png b/appshell/res/2.5x/min.png new file mode 100644 index 000000000..89e6de854 Binary files /dev/null and b/appshell/res/2.5x/min.png differ diff --git a/appshell/res/2.5x/restore-hover.png b/appshell/res/2.5x/restore-hover.png new file mode 100644 index 000000000..372f38f2b Binary files /dev/null and b/appshell/res/2.5x/restore-hover.png differ diff --git a/appshell/res/2.5x/restore-pressed.png b/appshell/res/2.5x/restore-pressed.png new file mode 100644 index 000000000..6fdb82734 Binary files /dev/null and b/appshell/res/2.5x/restore-pressed.png differ diff --git a/appshell/res/2.5x/restore.png b/appshell/res/2.5x/restore.png new file mode 100644 index 000000000..cb8d83b8b Binary files /dev/null and b/appshell/res/2.5x/restore.png differ diff --git a/appshell/res/2x/close-hover.png b/appshell/res/2x/close-hover.png new file mode 100644 index 000000000..05c2a9ef0 Binary files /dev/null and b/appshell/res/2x/close-hover.png differ diff --git a/appshell/res/2x/close-pressed.png b/appshell/res/2x/close-pressed.png new file mode 100644 index 000000000..b1b167c4e Binary files /dev/null and b/appshell/res/2x/close-pressed.png differ diff --git a/appshell/res/2x/close.png b/appshell/res/2x/close.png new file mode 100644 index 000000000..f46c7d66e Binary files /dev/null and b/appshell/res/2x/close.png differ diff --git a/appshell/res/2x/max-hover.png b/appshell/res/2x/max-hover.png new file mode 100644 index 000000000..4e1a32bb9 Binary files /dev/null and b/appshell/res/2x/max-hover.png differ diff --git a/appshell/res/2x/max-pressed.png b/appshell/res/2x/max-pressed.png new file mode 100644 index 000000000..f0b907d93 Binary files /dev/null and b/appshell/res/2x/max-pressed.png differ diff --git a/appshell/res/2x/max.png b/appshell/res/2x/max.png new file mode 100644 index 000000000..21951cd9a Binary files /dev/null and b/appshell/res/2x/max.png differ diff --git a/appshell/res/2x/min-hover.png b/appshell/res/2x/min-hover.png new file mode 100644 index 000000000..6d5c335f2 Binary files /dev/null and b/appshell/res/2x/min-hover.png differ diff --git a/appshell/res/2x/min-pressed.png b/appshell/res/2x/min-pressed.png new file mode 100644 index 000000000..f800c5a74 Binary files /dev/null and b/appshell/res/2x/min-pressed.png differ diff --git a/appshell/res/2x/min.png b/appshell/res/2x/min.png new file mode 100644 index 000000000..a0660ee97 Binary files /dev/null and b/appshell/res/2x/min.png differ diff --git a/appshell/res/2x/restore-hover.png b/appshell/res/2x/restore-hover.png new file mode 100644 index 000000000..10757ee14 Binary files /dev/null and b/appshell/res/2x/restore-hover.png differ diff --git a/appshell/res/2x/restore-pressed.png b/appshell/res/2x/restore-pressed.png new file mode 100644 index 000000000..bd1299331 Binary files /dev/null and b/appshell/res/2x/restore-pressed.png differ diff --git a/appshell/res/2x/restore.png b/appshell/res/2x/restore.png new file mode 100644 index 000000000..ec6976153 Binary files /dev/null and b/appshell/res/2x/restore.png differ diff --git a/appshell/res/close-hover.png b/appshell/res/close-hover.png index 531b4f93b..4768a3638 100644 Binary files a/appshell/res/close-hover.png and b/appshell/res/close-hover.png differ diff --git a/appshell/res/max.png b/appshell/res/max.png index a5d8d5c6a..bf79d1c37 100644 Binary files a/appshell/res/max.png and b/appshell/res/max.png differ diff --git a/appshell/resource.h b/appshell/resource.h index 3ca08166a..fddad4ac7 100644 --- a/appshell/resource.h +++ b/appshell/resource.h @@ -25,18 +25,70 @@ #define IDC_NAV_RELOAD 202 #define IDC_NAV_STOP 203 -#define IDB_CLOSE_BUTTON 300 -#define IDB_CLOSE_HOVER_BUTTON 301 -#define IDB_CLOSE_PRESSED_BUTTON 302 -#define IDB_MAX_BUTTON 303 -#define IDB_MAX_HOVER_BUTTON 304 -#define IDB_MAX_PRESSED_BUTTON 305 -#define IDB_MIN_BUTTON 306 -#define IDB_MIN_HOVER_BUTTON 307 -#define IDB_MIN_PRESSED_BUTTON 308 -#define IDB_RESTORE_BUTTON 309 -#define IDB_RESTORE_HOVER_BUTTON 310 -#define IDB_RESTORE_PRESSED_BUTTON 311 +#define IDB_CLOSE_BUTTON_1X 300 +#define IDB_CLOSE_HOVER_BUTTON_1X 301 +#define IDB_CLOSE_PRESSED_BUTTON_1X 302 +#define IDB_MAX_BUTTON_1X 303 +#define IDB_MAX_HOVER_BUTTON_1X 304 +#define IDB_MAX_PRESSED_BUTTON_1X 305 +#define IDB_MIN_BUTTON_1X 306 +#define IDB_MIN_HOVER_BUTTON_1X 307 +#define IDB_MIN_PRESSED_BUTTON_1X 308 +#define IDB_RESTORE_BUTTON_1X 309 +#define IDB_RESTORE_HOVER_BUTTON_1X 310 +#define IDB_RESTORE_PRESSED_BUTTON_1X 311 + +#define IDB_CLOSE_BUTTON_1_25X 312 +#define IDB_CLOSE_HOVER_BUTTON_1_25X 313 +#define IDB_CLOSE_PRESSED_BUTTON_1_25X 314 +#define IDB_MAX_BUTTON_1_25X 315 +#define IDB_MAX_HOVER_BUTTON_1_25X 316 +#define IDB_MAX_PRESSED_BUTTON_1_25X 317 +#define IDB_MIN_BUTTON_1_25X 318 +#define IDB_MIN_HOVER_BUTTON_1_25X 319 +#define IDB_MIN_PRESSED_BUTTON_1_25X 320 +#define IDB_RESTORE_BUTTON_1_25X 321 +#define IDB_RESTORE_HOVER_BUTTON_1_25X 322 +#define IDB_RESTORE_PRESSED_BUTTON_1_25X 323 + +#define IDB_CLOSE_BUTTON_1_5X 324 +#define IDB_CLOSE_HOVER_BUTTON_1_5X 325 +#define IDB_CLOSE_PRESSED_BUTTON_1_5X 326 +#define IDB_MAX_BUTTON_1_5X 327 +#define IDB_MAX_HOVER_BUTTON_1_5X 328 +#define IDB_MAX_PRESSED_BUTTON_1_5X 329 +#define IDB_MIN_BUTTON_1_5X 330 +#define IDB_MIN_HOVER_BUTTON_1_5X 331 +#define IDB_MIN_PRESSED_BUTTON_1_5X 332 +#define IDB_RESTORE_BUTTON_1_5X 333 +#define IDB_RESTORE_HOVER_BUTTON_1_5X 334 +#define IDB_RESTORE_PRESSED_BUTTON_1_5X 335 + +#define IDB_CLOSE_BUTTON_2X 336 +#define IDB_CLOSE_HOVER_BUTTON_2X 337 +#define IDB_CLOSE_PRESSED_BUTTON_2X 338 +#define IDB_MAX_BUTTON_2X 339 +#define IDB_MAX_PRESSED_BUTTON_2X 340 +#define IDB_MIN_BUTTON_2X 341 +#define IDB_MIN_HOVER_BUTTON_2X 342 +#define IDB_MIN_PRESSED_BUTTON_2X 343 +#define IDB_RESTORE_BUTTON_2X 344 +#define IDB_RESTORE_HOVER_BUTTON_2X 345 +#define IDB_RESTORE_PRESSED_BUTTON_2X 346 +#define IDB_MAX_HOVER_BUTTON_2X 347 + +#define IDB_CLOSE_BUTTON_2_5X 348 +#define IDB_CLOSE_HOVER_BUTTON_2_5X 349 +#define IDB_CLOSE_PRESSED_BUTTON_2_5X 350 +#define IDB_MAX_BUTTON_2_5X 351 +#define IDB_MAX_HOVER_BUTTON_2_5X 352 +#define IDB_MAX_PRESSED_BUTTON_2_5X 353 +#define IDB_MIN_BUTTON_2_5X 354 +#define IDB_MIN_HOVER_BUTTON_2_5X 355 +#define IDB_MIN_PRESSED_BUTTON_2_5X 356 +#define IDB_RESTORE_BUTTON_2_5X 357 +#define IDB_RESTORE_HOVER_BUTTON_2_5X 358 +#define IDB_RESTORE_PRESSED_BUTTON_2_5X 359 #define IDS_BINDING 1000 #define IDS_DIALOGS 1001 diff --git a/appshell/version.rc b/appshell/version.rc index 50a0b4f41..e7f1b28df 100644 --- a/appshell/version.rc +++ b/appshell/version.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,1,0,0 +FILEVERSION 1,2,0,0 /* PRODUCTVERSION 1,0,0,0 */ FILEOS VOS__WINDOWS32 FILETYPE VFT_APP @@ -43,7 +43,7 @@ BEGIN BEGIN VALUE "CompanyName", "brackets.io\0" VALUE "FileDescription", "\0" - VALUE "FileVersion", "Release 1.1.0\0" + VALUE "FileVersion", "Release 1.2.0\0" VALUE "ProductName", APP_NAME "\0" VALUE "ProductVersion", "\0" VALUE "LegalCopyright", "(c) 2012 Adobe Systems, Inc.\0" diff --git a/installer/mac/buildInstaller.sh b/installer/mac/buildInstaller.sh index 332ef5ecf..398eea613 100755 --- a/installer/mac/buildInstaller.sh +++ b/installer/mac/buildInstaller.sh @@ -2,7 +2,7 @@ # config releaseName="Brackets" -version="1.1" +version="1.2" dmgName="${releaseName} Release ${version}" format="bzip2" encryption="none" diff --git a/installer/win/brackets-win-install-build.xml b/installer/win/brackets-win-install-build.xml index 873e40487..f5d12691f 100644 --- a/installer/win/brackets-win-install-build.xml +++ b/installer/win/brackets-win-install-build.xml @@ -12,7 +12,7 @@ default="build.mul"> - + diff --git a/package.json b/package.json index 6409655f3..23d77d5fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Brackets-Shell", - "version": "1.1.0-0", + "version": "1.2.0-0", "homepage": "http://brackets.io", "issues": { "url": "http://github.com/adobe/brackets-shell/issues"