
/*********************************** LAYOUTS **********************************/

@variables
{
  bubble_width:expr(var(hb-param-screen-width)-var(hb-param-margin-gene-middle-horizontal)-var(hb-param-graphic-size-primary-small)-var(hb-param-margin-gene-left)-var(hb-param-margin-gene-right));
  bubble_height:expr((3*var(bubble_width))/4);
}

MsgConversationWidget[isMMS="false"]
{
  layout:layout-sms;
}

MsgConversationWidget[isMMS="true"]:portrait
{
  layout:layout-mms-portrait;
}

MsgConversationWidget[isMMS="true"][hasImage="true"]:landscape
{
  layout:layout-mms-image-landscape;
}

MsgConversationWidget[isMMS="true"][hasImage="false"]:landscape
{
  layout:layout-mms-landscape;
}

MsgConversationWidget[isMMS="true"][hasImage="false"][hasAudio="true"][hasVideo="false"]:portrait
{
  layout:layout-mms-audio-text-portrait;
}

MsgConversationWidget[isMMS="true"][hasImage="false"][hasAudio="true"][hasVideo="false"]:landscape
{
  layout:layout-mms-audio-text-landscape;
}

/********************* UNREAD INDICATOR / NEW ITEM ICON ************************/

MsgConversationWidget::newItemIcon
{
  left:-0.25un;
  top:-1.0un;
  bottom:1.0un;
  size-policy:fixed preferred;
  fixed-width:1.25un;
}

/*********************************** BUBBLE ***********************************/

MsgConversationWidget::bubble
{
  left:0.0un;
  top:0.0un;
  right:0.0un;
  bottom:0.0un;
}

/********************************** BODYTEXT **********************************/

MsgConversationWidget::bodyText
{
  left:-var(hb-param-margin-gene-left);
  top:-var(hb-param-margin-gene-top);
  right:1.0un;
  bottom:var(hb-param-margin-gene-middle-vertical);
  text-height:var(hb-param-text-height-secondary);
  font-variant:primary;
  text-align:left;
  text-line-count-min:1;
  text-line-count-max:100;
}

MsgConversationWidget[isMMS="true"][hasImage="true"]::bodyText:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}

MsgConversationWidget[isMMS="true"][hasImage="false"][hasAudio="true"]::bodyText:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}

/********************************** SUBJECT ***********************************/

MsgConversationWidget[isMMS="true"]::subject
{
  left:-var(hb-param-margin-gene-left);
  top:-var(hb-param-margin-gene-top);
  bottom:var(hb-param-margin-gene-middle-vertical);
  right:var(hb-param-margin-gene-middle-horizontal);
  text-align:left;
  text-height:var(hb-param-text-height-primary);
  font-variant:primary;
  text-line-count-max:1;
  text-line-count-min:1;
}

MsgConversationWidget[isMMS="true"][hasImage="true"]::subject:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}

MsgConversationWidget[isMMS="true"][hasImage="false"][hasAudio="true"]::subject:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}


/******************************* ATTACHMENT ICON ******************************/

MsgConversationWidget[isMMS="true"]::attachment
{
  right:1.0un;
  center-vertical:0.0un;
  aspect-ratio:ignore;
  size-policy:fixed fixed;
  pref-width:var(hb-param-graphic-size-secondary);
  pref-height:var(hb-param-graphic-size-secondary);
}

/********************************* PRIORITY ICON ******************************/

MsgConversationWidget[isMMS="true"]::priority
{
  right:0.5un;
  center-vertical:0.0un;
  aspect-ratio:ignore;
  size-policy:fixed fixed;
  pref-width:var(hb-param-graphic-size-secondary);
  pref-height:var(hb-param-graphic-size-secondary);
}

/******************************** IMAGE / PREVIEW *****************************/

MsgConversationWidget[isMMS="true"][hasImage="true"]::preview:portrait
{
  left:-var(hb-param-margin-gene-left);
  right:1.0un;
  bottom:var(hb-param-margin-gene-middle-vertical);
  aspect-ratio:keep;
  /*max-width:var(bubble_width);*/
  max-width:41.36un;
  max-height:31.02un;
  /*max-height:var(bubble_height);*/
  min-width:16un;
  min-height:12un;
}

MsgConversationWidget[isMMS="true"][hasImage="true"]::preview:landscape
{
  left:-var(hb-param-margin-gene-left);
  top:-var(hb-param-margin-gene-top);
  bottom:var(hb-param-margin-gene-bottom);
  aspect-ratio:keep;
  max-width:41.36un;
  max-height:31.02un;
  min-width:16un;
  min-height:12un;
}

/****************************** TIMESTAMP TEXT ********************************/

MsgConversationWidget::timeStamp
{
  left:-var(hb-param-margin-gene-left);
  right:1.0un;
  bottom:var(hb-param-margin-gene-bottom);
  text-align:left;
  text-height:var(hb-param-text-height-tiny);
  font-variant:primary;
  text-line-count-max:1;
  text-line-count-min:1;
}

MsgConversationWidget[isMMS="true"][hasImage="true"]::timeStamp:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}

MsgConversationWidget[isMMS="true"][hasImage="false"][hasAudio="true"]::timeStamp:landscape
{
  left:-var(hb-param-margin-gene-middle-horizontal);
}

/******************************* OVERLAY PLAY ICON ****************************/

MsgConversationWidget[isMMS="true"]::playIcon
{
  zvalue:1;
  aspect-ratio:ignore;
  size-policy:fixed fixed;
  pref-width:var(hb-param-graphic-size-primary-medium);
  pref-height:var(hb-param-graphic-size-primary-medium);
}

/******************************** AUDIO ICON **********************************/

MsgConversationWidget[isMMS="true"][hasAudio="true"]::audioIcon
{
  top:-var(hb-param-margin-gene-top);
  left:-var(hb-param-margin-gene-left);
  bottom:var(hb-param-margin-gene-middle-vertical);
  aspect-ratio:ignore;
  size-policy:fixed fixed;
  pref-width:var(hb-param-graphic-size-primary-large);
  pref-height:var(hb-param-graphic-size-primary-large);
}

/* EOF */