mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-28 00:54:39 +00:00
fix: Completed windows API, b=(no-bug), c=no-component
This commit is contained in:
@@ -366,6 +366,9 @@ menuitem {
|
||||
gap: 10px;
|
||||
z-index: 1000;
|
||||
padding: 10px;
|
||||
@media (-moz-platform: windows) {
|
||||
padding: 6px;
|
||||
}
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(
|
||||
170deg,
|
||||
@@ -398,6 +401,7 @@ menuitem {
|
||||
padding: 0 12px !important;
|
||||
min-width: unset !important;
|
||||
margin: 0px !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,24 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ZenShareInternal.h"
|
||||
#include "nsIWindowsUIUtils.h"
|
||||
#include "WindowsUIUtils.h"
|
||||
|
||||
auto nsZenNativeShareInternal::ShowNativeDialog(
|
||||
nsCOMPtr<mozIDOMWindowProxy>& aWindow, nsIURI* aUrl,
|
||||
const nsACString& aTitle, const nsACString& aText,
|
||||
uint32_t aX, uint32_t aY) const
|
||||
namespace zen {
|
||||
/**
|
||||
* @brief Helper function to convert UTF-8 to UTF-16.
|
||||
* @param aStr The UTF-8 string to convert.
|
||||
* @returns The converted UTF-16 string.
|
||||
*/
|
||||
inline NS_ConvertUTF8toUTF16 NS_ConvertUTF8toUTF16_MaybeVoid(
|
||||
const nsACString& aStr) {
|
||||
auto str = NS_ConvertUTF8toUTF16(aStr);
|
||||
str.SetIsVoid(aStr.IsVoid());
|
||||
return str;
|
||||
}
|
||||
} // namespace: zen
|
||||
|
||||
auto nsZenNativeShareInternal::ShowNativeDialog(nsCOMPtr<mozIDOMWindowProxy>& aWindow, nsIURI* aUrl,
|
||||
const nsACString& aTitle, const nsACString& aText, uint32_t aX, uint32_t aY)
|
||||
-> nsresult {
|
||||
nsAutoCString urlString;
|
||||
if (aUrl) {
|
||||
@@ -18,8 +30,8 @@ auto nsZenNativeShareInternal::ShowNativeDialog(
|
||||
} else {
|
||||
urlString.SetIsVoid(true);
|
||||
}
|
||||
(void)WindowsUIUtils::Share(NS_ConvertUTF8toUTF16_MaybeVoid(aTitle),
|
||||
NS_ConvertUTF8toUTF16_MaybeVoid(aText),
|
||||
NS_ConvertUTF8toUTF16_MaybeVoid(urlString));
|
||||
(void)WindowsUIUtils::Share(zen::NS_ConvertUTF8toUTF16_MaybeVoid(aTitle),
|
||||
zen::NS_ConvertUTF8toUTF16_MaybeVoid(aText),
|
||||
zen::NS_ConvertUTF8toUTF16_MaybeVoid(urlString));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -6,4 +6,6 @@ SOURCES += [
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
"../",
|
||||
"/widget",
|
||||
"/widget/windows",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user