
/*********************************** 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:portrait
{
  layout:layout-msg-portrait;
}

MsgConversationWidget:landscape
{
  layout:layout-msg-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;
  zvalue:-1;
}

/********************************** 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;
}

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

MsgConversationWidget::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-min:1;
  text-line-count-max:1;
}

MsgConversationWidget[isMMS="false"]::subject
{
  text-line-count-max:100;
  text-height:var(hb-param-text-height-secondary);
}

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

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


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

MsgConversationWidget::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::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::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;*/
  size-policy:fixed fixed;
  aspect-ratio:ignore;
}

MsgConversationWidget::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;*/
  size-policy:fixed fixed;
  aspect-ratio:ignore;
}

/****************************** 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;
}

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

MsgConversationWidget::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[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 */