src/writely/WriterUI.cpp
/**
 * Return true if virtual keyboard is defined
 */
Return true if virtual keyboard is defined
Return true if virtual keyboard is defined
bool WriterUI::determineVirtualKeyboardShown(int screenWidth, int screenHeight) {
    Q_UNUSED(screenWidth);
    if (isPhysicalKeyboardDevice()) return false;
    bool isPortrait = OrientationSupport::instance()->orientation() == UIOrientation::Portrait;
    bb::device::DisplayInfo info( bb::device::DisplayInfo::primaryDisplayId() );
    QSize size = info.pixelSize();
    int fullHeight = isPortrait ? std::max(size.width(), size.height()) : std::min(size.width(), size.height());
    return (fullHeight - screenHeight) > 250;
}
bool WriterUI :: determineVirtualKeyboardShown ( int screenWidth , int screenHeight ) { Q_UNUSED ( screenWidth ) ; if ( isPhysicalKeyboardDevice ( ) ) return false ; bool isPortrait = OrientationSupport :: instance ( ) -> orientation ( ) == UIOrientation :: Portrait ; bb :: device :: DisplayInfo info ( bb :: device :: DisplayInfo :: primaryDisplayId ( ) ) ; QSize size = info . pixelSize ( ) ; int fullHeight = isPortrait ? std :: max ( size . width ( ) , size . height ( ) ) : std :: min ( size . width ( ) , size . height ( ) ) ; return ( fullHeight - screenHeight ) > 250 ; }
Return true if virtual keyboard is defined
Return true if virtual keyboard is defined