Skip to content

Commit ee81be0

Browse files
committed
Merge branch 'develop-9.0' of https://github.com/livecode/livecode into feature-player-pan-mac
2 parents dca90c9 + 705dd91 commit ee81be0

6 files changed

Lines changed: 23 additions & 8 deletions

File tree

docs/notes/bugfix-20839-2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Improve appearance of disabled buttons when using Motif look-and-feel

docs/notes/bugfix-21395.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix MacOSX player control not starting when playRate property is 0

engine/src/buttondraw.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ void MCButton::draw(MCDC *dc, const MCRectangle& p_dirty, bool p_isolated, bool
109109
bool t_isvista = MCmajorosversion >= 0x0600 && MCcurtheme != NULL;
110110

111111
bool t_themed_menu = false;
112+
bool t_use_alpha_layer = false;
112113

113114
if (entry != NULL)
114115
{
@@ -352,7 +353,9 @@ void MCButton::draw(MCDC *dc, const MCRectangle& p_dirty, bool p_isolated, bool
352353
if (MClook == LF_MOTIF)
353354
{
354355
setforeground(dc, DI_FORE, False);
355-
dc->setfillstyle(FillStippled, nil, 0, 0);
356+
dc->setopacity(127);
357+
dc->begin(false);
358+
t_use_alpha_layer = true;
356359
}
357360
else if (IsMacLF())
358361
{
@@ -576,6 +579,9 @@ void MCButton::draw(MCDC *dc, const MCRectangle& p_dirty, bool p_isolated, bool
576579
MCStringRef t_name = MCNameGetString(getname());
577580
drawdirectionaltext(dc, rect.x + leftmargin, starty, t_name, m_font);
578581
}
582+
583+
if (t_use_alpha_layer)
584+
dc->end();
579585

580586
// MW-2012-01-27: [[ Bug 9432 ]] Native GTK handles focus borders itself
581587
// so don't render the win95-style one.
@@ -1608,7 +1614,7 @@ void MCButton::drawtabs(MCDC *dc, MCRectangle &srect)
16081614
{
16091615
case LF_MOTIF:
16101616
setforeground(dc, DI_FORE, False);
1611-
dc->setfillstyle(FillStippled, nil, 0, 0);
1617+
dc->setopacity(127);
16121618
break;
16131619
case LF_MAC:
16141620
dc->setforeground(dc->getgray());

engine/src/mac-av-player.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ - (void)setPlayer:(AVPlayer *)player
347347
m_buffered_time = 0;
348348

349349
m_scale = 1.0;
350-
m_rate = 0.0;
351-
350+
m_rate = 1.0;
351+
352352
m_time_observer_token = nil;
353353
m_endtime_observer_token = nil;
354354

engine/src/player-platform.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,10 +1394,17 @@ void MCPlayer::setplayrate()
13941394
{
13951395
if (m_platform_player != nil && hasfilename())
13961396
{
1397-
MCPlatformSetPlayerProperty(m_platform_player, kMCPlatformPlayerPropertyPlayRate, kMCPlatformPropertyTypeDouble, &rate);
1398-
if (rate != 0.0f)
1399-
// PM-2014-05-28: [[ Bug 12523 ]] Take into account the playRate property
1397+
if (rate == 0.0f)
1398+
{
1399+
// Setting playrate to 0 should pause the player (if playing)
1400+
MCPlatformStopPlayer(m_platform_player);
1401+
}
1402+
else
1403+
{
1404+
// start / resume at the new rate
1405+
MCPlatformSetPlayerProperty(m_platform_player, kMCPlatformPlayerPropertyPlayRate, kMCPlatformPropertyTypeDouble, &rate);
14001406
MCPlatformStartPlayer(m_platform_player, rate);
1407+
}
14011408
}
14021409

14031410
if (rate != 0)

ide-support/revsaveasandroidstandalone.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ private function addExternalFromFile pExternal, pClassesFolder, pLibsFolder
12781278

12791279
repeat for each word tArch in kArchs
12801280
local tPattern
1281-
put "^(?:External-" & tArch & "|lib.+" & tArch & "\.so)$" into tPattern
1281+
put "^Android/(?:External-" & tArch & "|lib.+" & tArch & "\.so)$" into tPattern
12821282
filter tZipItems with regex pattern tPattern into tZipItemsFiltered
12831283
put pLibsFolder & slash & tArch & slash & "lib" & tExternalName & ".so" into tLibFileA[tArch]
12841284

0 commit comments

Comments
 (0)