I am using XeLateX. How can i add a gradient in every new theorem,lemma etc like the image below? I want the gradient to fill the whole width of the line. How can this be done automatically?

My code
\documentclass[letterpaper,twoside,reqno,10pt]{book}
\usepackage[cm-default]{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{xgreek}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bold-extra}
\usepackage{fancyhdr}%renewcommend chaptername
\usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=1.6cm]{geometry} %
\usepackage{enumerate}
\usepackage{float}%text next2 image
\usepackage{cancel}%diagrafi metablitwn kathetos
\usepackage{empheq}
\usepackage{makeidx} % needed for creating an index
\usepackage{wrapfig}
\usepackage{amsthm}
\usepackage{thmtools}
% % % % % % % Me to style twn paradeigmatwn % % % % % % %
\declaretheoremstyle[headfont=\normalfont\bfseries]{normal}
\declaretheorem[style=normal,numberwithin=section,name=Παράδειγμα] {example}
\declaretheorem[style=normal,sibling=example,name=Σχόλιο]{sxolio}
\declaretheorem[style=normal,sibling=example,name=Πόρισμα]{corollary}
\declaretheorem[style=normal,sibling=example,name=Εφαρμογή]{application}
\declaretheorem[style=normal,sibling=example,name=Άσκηση]{homework}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % Me to style twn thewrimatwn % % % % % % % % % %
\declaretheorem[name=ΘΕΩΡΗΜΑ,numberwithin=section]{theorem}
\declaretheorem[name=ΛΗΜΜΑ,numberwithin=section]{lemma}
\declaretheorem[name=ΠΡΟΤΑΣΗ,numberwithin=section]{proposition}
\declaretheorem[name=ΟΡΙΣΜΟΣ,numberwithin=section]{definition}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % %OTF fonts % % % % % % % % % % % % % % % % % % % % % % % % % % %
\setmainfont[BoldFont=Kerkisbold,
ItalicFont=Kerkisitalics]{Kerkis}
\setsansfont{KerkisSans}
% % % % % % % % % % % % % % % % % % % % % % % % %
\begin{document}
\chapter{test}
\section{test}
\begin{theorem}\ \\
This is a theorem
\end{theorem}
text out of theorem
\begin{sxolio}\ \\
This is a comment
\end{sxolio}
\end{document}
