Changeset View
Changeset View
Standalone View
Standalone View
effects/slidingpopups/slidingpopups.cpp
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Line(s) | 391 | { | |||
---|---|---|---|---|---|
395 | auto internal = w->internalWindow(); | 395 | auto internal = w->internalWindow(); | ||
396 | if (!internal) { | 396 | if (!internal) { | ||
397 | return; | 397 | return; | ||
398 | } | 398 | } | ||
399 | const QVariant slideProperty = internal->property("kwin_slide"); | 399 | const QVariant slideProperty = internal->property("kwin_slide"); | ||
400 | if (!slideProperty.isValid()) { | 400 | if (!slideProperty.isValid()) { | ||
401 | return; | 401 | return; | ||
402 | } | 402 | } | ||
403 | AnimationData &animData = m_animationsData[w]; | 403 | Location location; | ||
404 | switch (slideProperty.value<KWindowEffects::SlideFromLocation>()) { | 404 | switch (slideProperty.value<KWindowEffects::SlideFromLocation>()) { | ||
405 | case KWindowEffects::BottomEdge: | 405 | case KWindowEffects::BottomEdge: | ||
406 | animData.location = Location::Bottom; | 406 | location = Location::Bottom; | ||
407 | break; | 407 | break; | ||
408 | case KWindowEffects::TopEdge: | 408 | case KWindowEffects::TopEdge: | ||
409 | animData.location = Location::Top; | 409 | location = Location::Top; | ||
410 | break; | 410 | break; | ||
411 | case KWindowEffects::RightEdge: | 411 | case KWindowEffects::RightEdge: | ||
412 | animData.location = Location::Right; | 412 | location = Location::Right; | ||
413 | break; | 413 | break; | ||
414 | case KWindowEffects::LeftEdge: | 414 | case KWindowEffects::LeftEdge: | ||
415 | animData.location = Location::Left; | 415 | location = Location::Left; | ||
416 | break; | 416 | break; | ||
417 | default: | 417 | default: | ||
418 | return; | 418 | return; | ||
419 | } | 419 | } | ||
420 | AnimationData &animData = m_animationsData[w]; | ||||
421 | animData.location = location; | ||||
420 | bool intOk = false; | 422 | bool intOk = false; | ||
421 | animData.offset = internal->property("kwin_slide_offset").toInt(&intOk); | 423 | animData.offset = internal->property("kwin_slide_offset").toInt(&intOk); | ||
422 | if (!intOk) { | 424 | if (!intOk) { | ||
423 | animData.offset = -1; | 425 | animData.offset = -1; | ||
424 | } | 426 | } | ||
425 | animData.slideLength = 0; | 427 | animData.slideLength = 0; | ||
426 | animData.slideInDuration = m_slideInDuration; | 428 | animData.slideInDuration = m_slideInDuration; | ||
427 | animData.slideOutDuration = m_slideOutDuration; | 429 | animData.slideOutDuration = m_slideOutDuration; | ||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |