Skip to content

Commit

Permalink
Add Always On Top window settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed May 23, 2014
1 parent e2a5a96 commit 937c546
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -986,14 +986,19 @@ void MythMainWindow::Init(QString forcedpainter)
flags |= Qt::MSWindowsOwnDC;
#endif

setWindowFlags(flags);

if (d->does_fill_screen && !GetMythUI()->IsGeometryOverridden())
{
LOG(VB_GENERAL, LOG_INFO, "Using Full Screen Window");
setWindowState(Qt::WindowFullScreen);
}

if (gCoreContext->GetNumSetting("AlwaysOnTop", false))
{
flags |= Qt::WindowStaysOnTopHint;
}

setWindowFlags(flags);

d->screenRect = QRect(d->xbase, d->ybase, d->screenwidth, d->screenheight);
d->uiScreenRect = QRect(0, 0, d->screenwidth, d->screenheight);

Expand Down
14 changes: 13 additions & 1 deletion mythtv/programs/mythfrontend/globalsettings.cpp
Expand Up @@ -2427,7 +2427,6 @@ static HostCheckBox *RunInWindow()
}

static HostCheckBox *UseFixedWindowSize()
{
{
HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");

Expand All @@ -2439,6 +2438,18 @@ static HostCheckBox *UseFixedWindowSize()
"window can be resized"));
return gc;
}

static HostCheckBox *AlwaysOnTop()
{
HostCheckBox *gc = new HostCheckBox("AlwaysOnTop");

gc->setLabel(AppearanceSettings::tr("Always On Top"));

gc->setValue(false);

gc->setHelpText(AppearanceSettings::tr("If enabled, MythTV will always be "
"on top"));
return gc;
}

static HostComboBox *MythDateFormatCB()
Expand Down Expand Up @@ -4199,6 +4210,7 @@ AppearanceSettings::AppearanceSettings()
column2->addChild(HideMouseCursor());
column2->addChild(RunInWindow());
column2->addChild(UseFixedWindowSize());
column2->addChild(AlwaysOnTop());
#ifdef USING_AIRPLAY
column2->addChild(AirPlayFullScreen());
#endif
Expand Down

0 comments on commit 937c546

Please sign in to comment.