Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
    ... ... @@ -1484,7 +1484,7 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1484 1484
         ) {
    
    1485 1485
             Column(
    
    1486 1486
                 modifier = modifier
    
    1487
    -                .padding(horizontal = 22.dp)
    
    1487
    +                .padding(horizontal = 24.dp)
    
    1488 1488
                     .verticalScroll(rememberScrollState())
    
    1489 1489
                     .fillMaxWidth(getVariableWidth(maxWidth)),
    
    1490 1490
                 horizontalAlignment = Alignment.CenterHorizontally,
    
    ... ... @@ -1501,16 +1501,18 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1501 1501
         ) {
    
    1502 1502
             Box(
    
    1503 1503
                 modifier = Modifier.background(PhotonColors.Violet90, shape = RoundedCornerShape(8.dp))
    
    1504
    -                .padding(16.dp),
    
    1505 1504
             ) {
    
    1506
    -            Row(
    
    1507
    -                modifier = Modifier.fillMaxWidth(),
    
    1508
    -            ) {
    
    1509
    -                Emoji()
    
    1510
    -                Spacer(Modifier.weight(1f))
    
    1511
    -                ExitIcon()
    
    1505
    +            Column {
    
    1506
    +                Row(
    
    1507
    +                    modifier = Modifier.fillMaxWidth().wrapContentHeight(),
    
    1508
    +                    verticalAlignment = Alignment.Top,
    
    1509
    +                ) {
    
    1510
    +                    Emoji()
    
    1511
    +                    Spacer(Modifier.weight(1f))
    
    1512
    +                    ExitIcon()
    
    1513
    +                }
    
    1514
    +                DynamicCampaignContent(alternateLayout)
    
    1512 1515
                 }
    
    1513
    -            DynamicCampaignContent(alternateLayout)
    
    1514 1516
             }
    
    1515 1517
         }
    
    1516 1518
     
    
    ... ... @@ -1521,12 +1523,12 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1521 1523
                 painter = painterResource(id = R.drawable.campaign_hand),
    
    1522 1524
                 contentDescription = null,
    
    1523 1525
                 modifier = Modifier
    
    1524
    -                .size(64.dp)
    
    1525
    -                .padding(16.dp)
    
    1526
    +                .size(48.dp)
    
    1527
    +                .padding(top = (16+8).dp, start = (16+8).dp)
    
    1526 1528
                     .drawBehind {
    
    1527 1529
                         drawCircle(
    
    1528 1530
                             color = alpha38Violet40,
    
    1529
    -                        radius = this.size.maxDimension
    
    1531
    +                        radius = this.size.height
    
    1530 1532
                         )
    
    1531 1533
                     }
    
    1532 1534
             )
    
    ... ... @@ -1535,6 +1537,7 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1535 1537
         @Composable
    
    1536 1538
         private fun ExitIcon() {
    
    1537 1539
             IconButton(
    
    1540
    +            modifier = Modifier.padding(8.dp),
    
    1538 1541
                 onClick = {
    
    1539 1542
                     binding.campaignBox.visibility = View.GONE
    
    1540 1543
                     binding.onionPatternImage.visibility = View.VISIBLE
    
    ... ... @@ -1551,8 +1554,7 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1551 1554
                     ),
    
    1552 1555
                     contentDescription = CampaignStrings.get(CampaignStrings.CloseKey),
    
    1553 1556
                     modifier = Modifier
    
    1554
    -                    .size(48.dp)
    
    1555
    -                    .padding(8.dp)
    
    1557
    +                    .padding(0.dp)
    
    1556 1558
                 )
    
    1557 1559
             }
    
    1558 1560
         }
    
    ... ... @@ -1562,10 +1564,12 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1562 1564
         private fun DynamicCampaignContent(
    
    1563 1565
             alternateLayout: Boolean
    
    1564 1566
         ) {
    
    1565
    -        Row(verticalAlignment = Alignment.CenterVertically) {
    
    1567
    +        Row(
    
    1568
    +            modifier = Modifier.padding(16.dp),
    
    1569
    +            verticalAlignment = Alignment.CenterVertically
    
    1570
    +        ) {
    
    1566 1571
                 Column(
    
    1567
    -                modifier = Modifier.fillMaxWidth()
    
    1568
    -                    .padding( top = 88.dp),
    
    1572
    +                modifier = Modifier.fillMaxWidth(),
    
    1569 1573
                     horizontalAlignment = Alignment.Start,
    
    1570 1574
                 ) {
    
    1571 1575
                     TitleText()
    
    ... ... @@ -1592,8 +1596,8 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1592 1596
                 color = PhotonColors.LightGrey05,
    
    1593 1597
                 textAlign = TextAlign.Left,
    
    1594 1598
                 fontWeight = FontWeight.Bold,
    
    1595
    -            fontSize = 24.sp,
    
    1596
    -            lineHeight = 34.sp,
    
    1599
    +            fontSize = 20.sp,
    
    1600
    +            lineHeight = 24.sp,
    
    1597 1601
                 modifier =  Modifier.padding(bottom = 16.dp)
    
    1598 1602
             )
    
    1599 1603
         }
    
    ... ... @@ -1610,14 +1614,14 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1610 1614
                         bottom = 18.dp,
    
    1611 1615
                     ),
    
    1612 1616
                 color = PhotonColors.LightGrey05,
    
    1613
    -            fontSize = 18.sp,
    
    1617
    +            fontSize = 14.sp,
    
    1614 1618
                 textAlign = TextAlign.Left,
    
    1615 1619
                 )
    
    1616 1620
         }
    
    1617 1621
     
    
    1618 1622
         @Composable
    
    1619 1623
         private fun Button1(alternateLayout: Boolean) {
    
    1620
    -        Button(
    
    1624
    +        TextButton(
    
    1621 1625
                 onClick = {
    
    1622 1626
                     var locale = CampaignStrings.getLocale()
    
    1623 1627
                     if (locale == "pt") {
    
    ... ... @@ -1639,21 +1643,21 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1639 1643
                 Text(text = CampaignStrings.get(CampaignStrings.CTAKey),
    
    1640 1644
                     color = PhotonColors.LightGrey05,
    
    1641 1645
                     textAlign = TextAlign.Center,
    
    1642
    -                fontSize = 18.sp,
    
    1646
    +                fontSize = 14.sp,
    
    1643 1647
                     modifier = Modifier.padding(8.dp))
    
    1644 1648
             }
    
    1645 1649
         }
    
    1646 1650
     
    
    1647 1651
         @Composable
    
    1648 1652
         private fun Button2() {
    
    1649
    -        Button(
    
    1653
    +        TextButton(
    
    1650 1654
                 onClick = {
    
    1651 1655
                     binding.campaignBox.visibility = View.GONE
    
    1652 1656
                     binding.onionPatternImage.visibility = View.VISIBLE
    
    1653 1657
                     context?.components?.settings?.hideCampaign = true
    
    1654 1658
                 },
    
    1655 1659
                 colors = ButtonDefaults.buttonColors(
    
    1656
    -            backgroundColor = PhotonColors.Violet90),
    
    1660
    +                backgroundColor = PhotonColors.Violet90),
    
    1657 1661
                 shape = RoundedCornerShape(4.dp),
    
    1658 1662
                 modifier = Modifier.padding(0.dp)
    
    1659 1663
                     .fillMaxWidth()
    
    ... ... @@ -1661,7 +1665,7 @@ class HomeFragment : Fragment(), UserInteractionHandler {
    1661 1665
                 Text(text = CampaignStrings.get(CampaignStrings.DismissKey),
    
    1662 1666
                 color = PhotonColors.Violet20,
    
    1663 1667
                 textAlign = TextAlign.Center,
    
    1664
    -            fontSize = 18.sp,
    
    1668
    +            fontSize = 14.sp,
    
    1665 1669
                 modifier = Modifier.padding(8.dp))
    
    1666 1670
             }
    
    1667 1671
         }