mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-29 14:46:02 +08:00
update
This commit is contained in:
parent
f8dee135a1
commit
c4cf4c13b8
@ -35,25 +35,6 @@ static inline bool isCompositionEnabled(){
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void showShadow(HWND hwnd){
|
||||
if(isCompositionEnabled()){
|
||||
const MARGINS shadow = { 0, 0, 1, 0 };
|
||||
typedef HRESULT (WINAPI* DwmExtendFrameIntoClientAreaPtr)(HWND hWnd, const MARGINS *pMarInset);
|
||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
||||
if (module)
|
||||
{
|
||||
DwmExtendFrameIntoClientAreaPtr dwm_extendframe_into_client_area_;
|
||||
dwm_extendframe_into_client_area_= reinterpret_cast<DwmExtendFrameIntoClientAreaPtr>(GetProcAddress(module, "DwmExtendFrameIntoClientArea"));
|
||||
if (dwm_extendframe_into_client_area_)
|
||||
{
|
||||
dwm_extendframe_into_client_area_(hwnd, &shadow);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ULONG_PTR cNewStyle = GetClassLongPtr(hwnd, GCL_STYLE) | CS_DROPSHADOW;
|
||||
SetClassLongPtr(hwnd, GCL_STYLE, cNewStyle);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
FramelessEventFilter::FramelessEventFilter(FluFramelessHelper* helper){
|
||||
@ -218,6 +199,8 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
||||
if(wParam == SC_MINIMIZE){
|
||||
if(_helper->window->transientParent()){
|
||||
_helper->window->transientParent()->showMinimized();
|
||||
}else{
|
||||
_helper->window->showMinimized();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -231,7 +214,6 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
||||
FluFramelessHelper::FluFramelessHelper(QObject *parent)
|
||||
: QObject{parent}
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FluFramelessHelper::classBegin(){
|
||||
|
@ -304,16 +304,17 @@ Rectangle {
|
||||
property var display: itemModel.display
|
||||
property int row: item_table.position.y
|
||||
property int column: item_table.position.x
|
||||
property bool isObject: typeof(display) == "object"
|
||||
property var options: {
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.options
|
||||
if(isObject){
|
||||
return display.options
|
||||
}
|
||||
return {}
|
||||
}
|
||||
anchors.fill: parent
|
||||
sourceComponent: {
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.comId
|
||||
if(isObject){
|
||||
return display.comId
|
||||
}
|
||||
return com_text
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ Rectangle {
|
||||
id:com_text
|
||||
FluText {
|
||||
id:item_text
|
||||
text: String(display)
|
||||
text: display
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.WrapAnywhere
|
||||
anchors{
|
||||
@ -306,16 +306,17 @@ Rectangle {
|
||||
property var display: itemModel.display
|
||||
property int row: item_table.position.y
|
||||
property int column: item_table.position.x
|
||||
property bool isObject: typeof(display) == "object"
|
||||
property var options: {
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.options
|
||||
if(isObject){
|
||||
return display.options
|
||||
}
|
||||
return {}
|
||||
}
|
||||
anchors.fill: parent
|
||||
sourceComponent: {
|
||||
if(typeof(modelData) == "object"){
|
||||
return modelData.comId
|
||||
if(isObject){
|
||||
return display.comId
|
||||
}
|
||||
return com_text
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user